|
8 | 8 | branches: [master] |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - DevOps: |
| 11 | + PreflightChecks: |
12 | 12 | runs-on: ubuntu-latest |
13 | 13 | strategy: |
14 | | - fail-fast: true |
15 | 14 | matrix: |
16 | 15 | python-version: ["3.8", "3.9", "3.10", "3.11"] |
17 | 16 | steps: |
18 | 17 | #---------------------------------------------- |
19 | | - # check-out repo and set-up python |
| 18 | + # checkout repository |
20 | 19 | #---------------------------------------------- |
21 | 20 | - name: Checkout repository |
22 | 21 | uses: actions/checkout@v3 |
| 22 | + #---------------------------------------------- |
| 23 | + # setup specific python |
| 24 | + #---------------------------------------------- |
23 | 25 | - name: Setup Python v${{ matrix.python-version }} |
24 | | - # id: setup-python |
25 | 26 | uses: actions/setup-python@v4 |
26 | 27 | with: |
27 | 28 | python-version: ${{ matrix.python-version }} |
28 | 29 | #---------------------------------------------- |
29 | | - # install & configure poetry |
30 | | - #---------------------------------------------- |
31 | | - - name: Install Poetry |
32 | | - uses: snok/install-poetry@v1 |
33 | | - with: |
34 | | - version: 1.3.2 |
35 | | - virtualenvs-create: true |
36 | | - virtualenvs-in-project: true |
37 | | - #---------------------------------------------- |
38 | | - # load cached venv if cache exists |
| 30 | + # install dependencies |
39 | 31 | #---------------------------------------------- |
40 | | - # - name: Load cached venv |
41 | | - # id: cached-poetry-dependencies |
42 | | - # uses: actions/cache@v3 |
43 | | - # with: |
44 | | - # path: .venv |
45 | | - # key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} |
46 | | - #---------------------------------------------- |
47 | | - # install dependencies if cache does not exist |
48 | | - #---------------------------------------------- |
49 | | - - name: Install test dependencies |
50 | | - # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' |
51 | | - run: poetry install --no-interaction --no-root --no-ansi --only tests |
| 32 | + - name: Install dependencies |
| 33 | + run: | |
| 34 | + python -m pip install --upgrade pip |
| 35 | + python -m pip install tox tox-gh-actions |
52 | 36 | #---------------------------------------------- |
53 | | - # run test suite |
| 37 | + # run preflight checks |
54 | 38 | #---------------------------------------------- |
55 | | - - name: Run tests |
56 | | - run: | |
57 | | - source .venv/bin/activate |
58 | | - pytest tests/ |
| 39 | + - name: Preflight checks with tox |
| 40 | + run: tox |
| 41 | + env: |
| 42 | + PLATFORM: ${{ matrix.platform }} |
0 commit comments