-
Notifications
You must be signed in to change notification settings - Fork 96
61 lines (61 loc) · 1.7 KB
/
test.yaml
File metadata and controls
61 lines (61 loc) · 1.7 KB
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
name: Test
on:
push:
branches:
- "**" # every branch
- "!gh-pages" # exclude gh-pages branch
- "!stage*" # exclude branches beginning with stage
paths:
- "datajoint"
- "tests"
- ".pre-commit-config.yaml"
pull_request:
branches:
- "**" # every branch
- "!gh-pages" # exclude gh-pages branch
- "!stage*" # exclude branches beginning with stage
paths:
- "datajoint"
- "tests"
- ".pre-commit-config.yaml"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
# enforce the same check as pre-commit
# but only run important checks
- uses: pre-commit/action@v3.0.1
with:
extra_args: codespell --all-files
- uses: pre-commit/action@v3.0.1
with:
extra_args: black --all-files
- uses: pre-commit/action@v3.0.1
with:
extra_args: flake8 --all-files
test:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
py_ver: ["3.9", "3.10", "3.11", "3.12", "3.13"]
mysql_ver: ["8.0"]
include:
- py_ver: "3.9"
mysql_ver: "5.7"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{matrix.py_ver}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.py_ver}}
- name: Integration test
env:
PY_VER: ${{matrix.py_ver}}
MYSQL_VER: ${{matrix.mysql_ver}}
# taking default variables set in docker-compose.yaml to sync with local test
run: |
export HOST_UID=$(id -u)
docker compose --profile test up --quiet-pull --build --exit-code-from djtest djtest