forked from acoomans/flask-autodoc
-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (36 loc) · 1.32 KB
/
minimal-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
name: Run critical Python tests
on:
- push
jobs:
testing:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
flask-version: [latest]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip3 install poetry
- name: Force Python version (linux/macOS)
if: matrix.os != 'windows-latest'
# sed command for macOS: https://stackoverflow.com/a/44864004
run: sed -i.bak 's/python = "^3.6"/python = "~${{ matrix.python-version }}"/' pyproject.toml
- name: Force Python version (windows)
if: matrix.os == 'windows-latest'
run: (Get-Content pyproject.toml).replace('python = "^3.6"', 'python = "~${{ matrix.python-version }}"') | Set-Content pyproject.toml
- name: Force Flask version
run: poetry add Flask==${{ matrix.flask-version }}
- name: Install requirements
run: poetry install
- name: List installed package versions for manual inspection
run: poetry --version && poetry show
- name: Test package
run: poetry run test
- name: Test package
run: poetry run doctest