-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (48 loc) · 1.43 KB
/
test.yml
File metadata and controls
52 lines (48 loc) · 1.43 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
on:
pull_request:
push:
branches:
- main
jobs:
pytest:
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
cfg:
- os: ubuntu-latest
python-version: "3.7"
- os: ubuntu-latest
python-version: "3.8"
- os: ubuntu-latest
python-version: "3.9"
- os: macos-latest
python-version: "3.7"
pytest-opts: "-m 'not docker'"
- os: macos-latest
python-version: "3.8"
pytest-opts: "-m 'not docker'"
- os: macos-latest
python-version: "3.9"
pytest-opts: "-m 'not docker'"
publish-docs: true
runs-on: ${{ matrix.cfg.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.cfg.python-version }}
- run: pip install poetry
- run: poetry config virtualenvs.in-project true
- run: poetry -V
- run: poetry install
- uses: pre-commit/action@v2.0.0
with:
extra_args: --verbose --all-files
- run: poetry run pytest ${{ matrix.cfg.pytest-opts }}
- run: poetry run whaler --no-server ../..
- if: matrix.cfg.publish-docs && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_whaler/html