-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (62 loc) · 1.96 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
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [ '3.11', '3.10', '3.9' ]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install pipenv
- run: python -m pipenv sync --dev
# Invoke currently seems not support PowerShell,
# production code of this package doesn't depends on cmd, however test depends on cmd.
# - GitHub Actions default shell on Windows runners is changing to PowerShell | GitHub Changelog
# https://github.blog/changelog/2019-10-17-github-actions-default-shell-on-windows-runners-is-changing-to-powershell/
- if: runner.os == 'Windows'
run: python -m pipenv run invoke test.all
shell: cmd
- if: runner.os == 'Linux'
run: python -m pipenv run invoke test.all
check_style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: python -m pip install pipenv
- run: python -m pipenv sync --dev
- run: python -m pipenv run invoke style --check
check_lint_fast:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: python -m pip install pipenv
- run: python -m pipenv sync --dev
- run: python -m pipenv run invoke lint
check_lint_deep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: python -m pip install pipenv
- run: python -m pipenv sync --dev
- run: python -m pipenv run invoke lint.deep