This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
forked from kobotoolbox/enketo-express
-
Notifications
You must be signed in to change notification settings - Fork 23
52 lines (50 loc) · 1.49 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: npmjs
on:
push:
pull_request:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
env:
TEST_REDIS_MAIN_PORT: 6379
TEST_REDIS_CACHE_PORT: 6380
strategy:
matrix:
node: ['14', '16']
services:
redis-6379:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- '6379:6379'
redis-6380:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- '6380:6379'
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache
with:
path: node_modules
key: ${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
registry-url: https://registry.npmjs.org/
- run: npm install -g npm@^6
- if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- run: npm test