-
Notifications
You must be signed in to change notification settings - Fork 117
93 lines (89 loc) · 2.69 KB
/
main.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
name: Node.js CI
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node:
- 'lts/iron'
- '22'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run build
- run: npm run lint
- run: npm run build-docs
- run: npm run test -- --runInBand
- name: Codecov
uses: codecov/[email protected]
with:
file: .coverage/*.json
env:
CI: true
RUN_INTEGRATION: true
integration-tests-testnet:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
include:
- testnet: parisnet
testnet_uppercase: PARISNET
rpc_url: https://rpc.pariscnet.teztnets.com/
- testnet: quebecnet
testnet_uppercase: QUEBECNET
rpc_url: https://rpc.quebecnet.teztnets.com/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/iron
- run: npm ci
- run: npm run build
- if: ${{ !github.event.pull_request.head.repo.fork }}
name: Tailscale
uses: tailscale/github-action@v1
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
version: 1.32.2
- id: run-tests
run: npm -w integration-tests run test:${{ matrix.testnet }} -- --maxWorkers=4
env:
# Ternary operator workaround
TEZOS_RPC_${{ matrix.testnet_uppercase }}: ${{ github.event.pull_request.head.repo.fork && matrix.rpc_url || null }}
# integration-tests-quebec-secret-key:
# runs-on: ubuntu-latest
# continue-on-error: true
# strategy:
# matrix:
# include:
# - testnet: quebecnet
# testnet_uppercase: QUEBECNET
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: lts/iron
# - run: npm ci
# - run: npm run build
# - if: ${{ !github.event.pull_request.head.repo.fork }}
# name: Tailscale
# uses: tailscale/github-action@v1
# with:
# authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
# version: 1.32.2
# - run: npm -w integration-tests run test:quebecnet-secret-key
# env:
# RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true