-
Notifications
You must be signed in to change notification settings - Fork 68
82 lines (70 loc) · 2.14 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: ci
on:
- pull_request
jobs:
lint:
runs-on: ubuntu-20.04
steps:
# Action Repo: https://github.com/actions/checkout
- name: 'Checkout repo'
uses: actions/checkout@v2
# Action Repo: https://github.com/actions/setup-node
- name: 'Setup Node'
uses: actions/setup-node@v1
with:
node-version: '16'
# Action Repo: https://github.com/actions/cache
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
- name: 'Install'
run: npm ci
- name:
run: npm run lint
test:
runs-on: ubuntu-20.04
needs: lint
steps:
- name: 'Checkout repo'
uses: actions/checkout@v2
# Action Repo: https://github.com/actions/setup-node
- name: 'Setup Node'
uses: actions/setup-node@v1
with:
node-version: '16'
# Action Repo: https://github.com/actions/cache
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
- name: 'Install dependencies'
run: |
npm ci
- name: 'Build the library'
run: |
npm run build
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.test.yml') }}
- name: Install conda environment
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: jupyter-server
environment-file: environment.test.yml
python-version: 3.9
- name: 'Run tests'
shell: bash -l {0}
run: |
npm run test
# Action Repo: https://github.com/codecov/codecov-action
- name: 'Upload coverage to codecov'
uses: codecov/codecov-action@v1