-
Notifications
You must be signed in to change notification settings - Fork 6
51 lines (44 loc) · 1.47 KB
/
lint_and_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
name: Lint and test
on:
workflow_dispatch:
push:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Pull docker image 🐳
run: docker pull cmsml/cmsml
- name: Lint 🔍
run: bash tests/docker.sh cmsml/cmsml tests/lint.sh
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
versions:
# scan python versions
- {tag: "3.7", tf: "default"}
- {tag: "3.8", tf: "default"}
- {tag: "3.9", tf: "default"}
- {tag: "3.10", tf: "default"}
- {tag: "3.11", tf: "default"}
# scan tf versions
- {tag: "3.9_base", tf: "2.5.3"}
- {tag: "3.9_base", tf: "2.6.5"}
- {tag: "3.9_base", tf: "2.11.1"}
- {tag: "3.9_base", tf: "2.12.1"}
- {tag: "3.9_base", tf: "2.13.0"}
name: test (image=${{ matrix.versions.tag }}, tf=${{ matrix.versions.tf }})
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Pull docker image 🐳
run: docker pull cmsml/cmsml:${{ matrix.versions.tag }}
- name: Test 🎰
run: bash tests/docker.sh cmsml/cmsml:${{ matrix.versions.tag }} "[ '${{ matrix.versions.tf }}' = 'default' ] || pip install -U tensorflow=='${{ matrix.versions.tf }}'; pytest -n auto tests"