V3 experiments #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint: | |
name: Lint source files | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
- name: Install dependencies | |
run: yarn | |
- name: Lint source files | |
run: yarn lint | |
unit-tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: Run unit tests | |
run: yarn test tests/unit | |
- name: Upload coverage | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel: true | |
integration-tests: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
node: | |
- 18 | |
- 20 | |
name: Test Node ${{ matrix.node }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- name: Install ffmpeg | |
uses: ConorMacBride/install-package@v1 | |
with: | |
apt: ffmpeg | |
brew: ffmpeg | |
choco: ffmpeg | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: yarn build | |
- name: Run tests | |
run: yarn test tests/integration | |
- name: Upload coverage | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel: true | |
finish-coverage: | |
name: Finalize coverage | |
needs: | |
- unit-tests | |
- integration-tests | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Finalize coverage | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel-finished: true |