-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (41 loc) · 979 Bytes
/
test.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
name: Run Tests
on:
push:
branches:
- master
pull_request:
types: ['opened', 'reopened', 'synchronize']
jobs:
test:
strategy:
matrix:
nodejs: [ '18', '20', '21', '22' ]
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
pull-requests: write
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.nodejs }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.nodejs }}
- run: yarn install --frozen-lockfile
- name: 'Run Tests'
run: yarn test
env:
REDIS_HOST: redis