-
Notifications
You must be signed in to change notification settings - Fork 880
55 lines (54 loc) · 1.4 KB
/
ci.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
name: CI Testing
on:
pull_request:
push:
branches:
- master
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20, 21]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install flvtool2
run: sudo gem install flvtool2
- name: Install ffmpeg
run: sudo apt install -y ffmpeg
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test
- name: Generate coverage report
run: yarn coverage
- name: Store coveralls coverage
uses: coverallsapp/github-action@v2
with:
flag-name: linux-node-${{ matrix.node }}
parallel: true
- name: Upload to codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage/lcov.info
name: ubuntu-latest-node-${{ matrix.node }}
upload-coverage:
name: Upload coverage
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Upload to coveralls
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "linux-node-18,linux-node-20,linux-node-21"