-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.22 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
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- develop
jobs:
ci:
name: "Lint & Test"
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TZ: Europe/Amsterdam # some tests depend on this
steps:
- uses: actions/checkout@v4
- uses: FedericoCarboni/setup-ffmpeg@v3
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 16
cache: npm
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Cache npm dependencies
uses: actions/cache@v4
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm run test
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true