-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (63 loc) · 1.75 KB
/
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
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
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
# Cancel in-progress workflows when pushing
# a new commit on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test_kit:
name: Test
runs-on: ubuntu-latest
env:
CONDA_ENV: 'testcondaenv'
defaults:
run:
# Need to use this shell to get cond working properly.
# See https://github.com/marketplace/actions/setup-miniconda#important
shell: 'bash -l {0}'
steps:
- uses: actions/checkout@v3
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: ${{ env.CONDA_ENV }}
python-version: "3.10"
# Use miniforge to only get conda-forge as default channel.
miniforge-version: latest
- name: Install the ramp-kit's dependencies
run: pip install -r requirements.txt
- name: Ramp test
run: ramp-test
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: pip install flake8
- name: Flake8 linter
run: flake8 .
nbconvert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install seaborn nbconvert[test]
pip install -r requirements.txt
- name: Check the starting-kit notebook
run: jupyter nbconvert --execute template_starting_kit.ipynb --to html --ExecutePreprocessor.kernel_name=python3