generated from Sceptre/sceptre-resolver-template
-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (54 loc) · 1.53 KB
/
tests.yaml
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
name: tests
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
packaging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: build package
run: poetry build
# use https://github.com/medmunds/tox-gh-matrix to export tox envlist to GH actions
get-tox-envlist:
runs-on: ubuntu-latest
outputs:
envlist: ${{ steps.generate-envlist.outputs.envlist }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --all-extras
- id: generate-envlist
run: poetry run tox --gh-matrix
unit-tests:
needs: get-tox-envlist
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
tox: ${{ fromJSON(needs.get-tox-envlist.outputs.envlist) }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.tox.python.spec }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --all-extras
- name: run python tests
run: poetry run tox -e ${{ matrix.tox.name }}
- name: run python test report
run: poetry run tox -e report