-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (56 loc) · 1.79 KB
/
test.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
name: Test
on: [push, pull_request]
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
VALIDATOR_MNEMONIC: ${{secrets.VALIDATOR_MNEMONIC}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: sudo apt update && sudo apt install -y jq
- run: scripts/start-local-node.sh
- run: yarn install --immutable
- run: yarn build:all
- run: yarn test:all
- name: Upload coverage report to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
if: github.event_name == 'push'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# comma-separated list for multiple reports
coverage-reports: packages/arch3-core/coverage/lcov.info
eslint:
name: ESLint
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: sudo apt update && sudo apt install -y jq
- run: yarn install --immutable
- run: yarn build:all
- run: yarn lint:sarif:all || true
- run: |
mkdir -p ./reports
for f in *.sarif packages/*/*.sarif; do
# Filter out lint results with suppressions because of nasty false positives on GitHub
jq '.runs |= map(.results |= map(. | select(.suppressions | length == 0)))' "$f" > "./reports/$(basename $f)"
done
- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ./reports
category: eslint
wait-for-processing: true