-
Notifications
You must be signed in to change notification settings - Fork 128
145 lines (121 loc) · 3.83 KB
/
verify-pull-request.yml
File metadata and controls
145 lines (121 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: PR checks
on:
pull_request:
env:
CI: false
YARN_ENABLE_HARDENED_MODE: 0
jobs:
# Running yarn install in hardened mode here makes it safe to run the other
# jobs without hardened mode, which is good because hardened mode is slow.
# https://yarnpkg.com/features/security#hardened-mode
check-yarn-lock-poisoning:
name: Check for yarn.lock poisoning
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check if yarn.lock changed
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
lockfile:
- "yarn.lock"
- name: Check yarn.lock for lockfile poisoning
if: steps.filter.outputs.lockfile == 'true'
uses: ./.github/actions/yarn-cache
env:
YARN_ENABLE_HARDENED_MODE: 1
lint:
name: Lint
runs-on: ubuntu-latest
needs: [check-yarn-lock-poisoning]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Run ESLint
run: yarn lint:ci
unit-tests-js:
name: JS unit tests
needs: [check-yarn-lock-poisoning]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Apt update
run: sudo apt update
shell: bash
- name: Run unit tests
id: run-unit-tests
run: yarn test:ci
build-interface:
name: Build Namadillo
needs: [check-yarn-lock-poisoning]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Apt update
run: sudo apt update
shell: bash
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- name: build the site
working-directory: ./apps/namadillo
run: yarn build
env:
NAMADA_INTERFACE_NAMADA_ALIAS: "Namada Devnet"
NAMADA_INTERFACE_NAMADA_CHAIN_ID: "internal-devnet-6be.86067e06a5"
NAMADA_INTERFACE_NAMADA_URL: "https://proxy.heliax.click/internal-devnet-6be.86067e06a5"
build-extension:
name: Build Extension
needs: [check-yarn-lock-poisoning]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- name: Apt update
run: sudo apt update
shell: bash
- name: Build the extension
working-directory: ./apps/extension
run: yarn build:chrome
E2E-tests:
if: false
name: E2E tests
needs: [build-interface]
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./apps/namadillo
steps:
- uses: actions/checkout@v4
- name: Install yarn dependencies
uses: ./.github/actions/yarn-cache
- uses: actions/setup-node@v2
with:
node-version: "18.x"
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.3.0
with:
version: "v0.10.3"
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
id: run-playwright-tests
run: PLAYWRIGHT_BASE_URL=https://pull-request-${{ github.event.number }}--wallet-development-heliax-dev.netlify.app NETLIFY_SITE_PROTECTION_PASSWORD=${{ secrets.NETLIFY_SITE_PROTECTION_PASSWORD }} yarn playwright test
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30