-
-
Notifications
You must be signed in to change notification settings - Fork 74
55 lines (43 loc) · 1.19 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
53
54
55
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [18.x]
steps:
- name: Installing Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Installing Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: '6.x'
- name: Downloading code
uses: actions/checkout@v3
- name: Installing other dependencies
run: |
npm install
npm i -g eslint
npm i -g codecov
wget -qO- https://download.openzim.org/release/zim-tools/zim-tools_linux-x86_64.tar.gz | tar xvz
- name: Running ESLint
run: npm run lint
- name: Running tests
run: npm run codecov
env:
REDIS: 'redis://127.0.0.1:6379'
S3_URL: ${{ secrets.S3_URL }}
ZIMCHECK_PATH: $( find .. -name zimcheck )
ZIMDUMP_PATH: $( find .. -name zimdump )
- name: Uploading Codecov stats
uses: codecov/codecov-action@v3
if: ${{ matrix.node-version == '18.x' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}