forked from matter-labs/block-explorer
-
Notifications
You must be signed in to change notification settings - Fork 2
100 lines (90 loc) · 2.55 KB
/
validate-pr.yml
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
name: Validate PR
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
label:
name: Validate PR title
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v5
with:
subjectPattern: ^(?![A-Z]).+$
env:
GITHUB_TOKEN: ${{ github.token }}
build:
name: Build and Test
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
checks: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- name: Install dependencies
run: |
yarn install
- name: Lint
run: |
yarn run lerna run lint -- -- --no-fix --max-warnings 0
# - name: App type check
# working-directory: ./packages/app
# run: |
# yarn run typecheck
- name: Test
env:
VITE_API_URL: "http://api.example"
VITE_BASE_TOKEN_ADDRESS: "0x"
VITE_BRIDGE_URL: "http://bridge.example"
VITE_HOSTNAMES: "http://host.example"
VITE_ICON: "http://host.example/icon.svg"
VITE_L2_CHAIN_ID: "1111"
VITE_L2_NETWORK_NAME: "example"
VITE_MAINTENANCE: "true"
VITE_NAME: "test"
VITE_PUBLISHED: "true"
VITE_RPC_URL: "http://rpc.example"
run: |
yarn run test:ci
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: always()
with:
files: |
packages/app/junit.xml
packages/api/junit.xml
packages/worker/junit.xml
packages/data-fetcher/junit.xml
check_run_annotations: all tests, skipped tests
report_individual_runs: "true"
check_name: Unit Test Results
- name: Build
env:
VITE_API_URL: "http://api.example"
VITE_BASE_TOKEN_ADDRESS: "0x"
VITE_BRIDGE_URL: "http://bridge.example"
VITE_HOSTNAMES: "http://host.example"
VITE_ICON: "http://host.example/icon.svg"
VITE_L2_CHAIN_ID: "1111"
VITE_L2_NETWORK_NAME: "example"
VITE_MAINTENANCE: "true"
VITE_NAME: "test"
VITE_PUBLISHED: "true"
VITE_RPC_URL: "http://rpc.example"
run: |
yarn run build