forked from ipfs/ipfs-webui
-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (45 loc) · 1.62 KB
/
test-e2e.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
on:
workflow_call:
jobs:
test-e2e:
name: 'test:e2e'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend: [go] # TODO: add 'js' – see https://github.com/ipfs/ipfs-webui/issues/1737
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 16.12.0
- name: Setup [email protected]
run: |
npm install -g [email protected]
- name: Cache bigger downloads
uses: actions/cache@v2
id: cache
with:
path: ${{ github.workspace }}/.cache
key: ${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ hashFiles('package.json', 'package-lock.json') }}
${{ runner.os }}-
- name: Install dependencies
run: npm ci --prefer-offline --no-audit --progress=false --cache ${{ github.workspace }}/.cache/npm
# This is required to ensure that our code is instrumented with coverage details
- name: Run test build
run: npm run test:build
- name: Run E2E against ${{ matrix.backend }}-ipfs
run: E2E_IPFSD_TYPE=${{ matrix.backend }} npm run test:e2e
- name: Generate nyc coverage report
id: coverage
run: npx nyc report --reporter=lcov
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: e2e_tests # optional
name: e2e-coverage # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)