Skip to content

Use GH actions v4

Use GH actions v4 #283

name: mediasoup-client
on: [push, pull_request]
concurrency:
# Cancel a currently running workflow from the same PR, branch or tag when a
# new workflow is triggered.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ci:
strategy:
matrix:
# Different Node versions on Ubuntu, the latest Node on other platforms.
ci:
- os: ubuntu-22.04
node: 16
- os: macos-12
node: 18
- os: ubuntu-22.04
node: 20
runs-on: ${{ matrix.ci.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.ci.node }}
- name: Configure cache
uses: actions/cache@v3
with:
path: |
~/.npm
key: ${{ matrix.ci.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ matrix.ci.os }}-node-
- run: npm ci
- run: npm run lint
- run: npm run test