@@ -3,28 +3,33 @@ name: Tests
33on :
44 pull_request : {}
55 push :
6- branches : [main]
6+ branches :
7+ - main
8+
9+
10+ concurrency :
11+ group : tests-${{ github.head_ref || github.ref }}
12+ cancel-in-progress : ${{ github.event_name == 'pull_request' }}
713
814jobs :
915 tests :
10- name : ${{ matrix.os }} / ${{ matrix.python-version }}
11- runs-on : " ${{ matrix.os }}-latest"
12- continue-on-error : ${{ matrix.experimental }}
16+ name : ${{ matrix.os }} / ${{ matrix.python-version }} ${{ matrix.suffix }}
17+ runs-on : ${{ matrix.image }}
1318 strategy :
1419 matrix :
15- os : [Ubuntu, MacOS, Windows]
16- python-version : [3.6, 3.7, 3.8, 3.9]
17- experimental : [false]
18- bootstrap-args : [""]
20+ os : [Ubuntu, macOS, Windows]
21+ python-version : ["3.7", "3.8", "3.9", "3.10"]
1922 include :
2023 - os : Ubuntu
21- python-version : pypy3
22- experimental : false
23- - os : Ubuntu
24- python-version : " 3.10.0-alpha - 3.10.0"
25- experimental : true
26- bootstrap-args : " --git https://github.com/python-poetry/poetry.git"
24+ image : ubuntu-latest
25+ - os : Windows
26+ image : windows-2022
27+ - os : macOS
28+ image : macos-11
2729 fail-fast : false
30+ defaults :
31+ run :
32+ shell : bash
2833 steps :
2934 - uses : actions/checkout@v2
3035
@@ -35,26 +40,21 @@ jobs:
3540
3641 - name : Get full Python version
3742 id : full-python-version
38- shell : bash
3943 run : echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
4044
4145 - name : Bootstrap poetry
42- shell : bash
4346 run : |
44- curl -sL https://raw.githubusercontent.com/ python-poetry/poetry/master/install-poetry.py \
45- | python - -y ${{ matrix.bootstrap-args }}
47+ curl -sL https://install. python-poetry.org | python - -y ${{ matrix.bootstrap-args }}
48+
4649 - name : Update PATH
4750 if : ${{ matrix.os != 'Windows' }}
48- shell : bash
4951 run : echo "$HOME/.local/bin" >> $GITHUB_PATH
5052
5153 - name : Update Path for Windows
5254 if : ${{ matrix.os == 'Windows' }}
53- shell : bash
5455 run : echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
5556
5657 - name : Configure poetry
57- shell : bash
5858 run : poetry config virtualenvs.in-project true
5959
6060 - name : Set up cache
@@ -66,13 +66,13 @@ jobs:
6666
6767 - name : Ensure cache is healthy
6868 if : steps.cache.outputs.cache-hit == 'true'
69- shell : bash
7069 run : timeout 10s poetry run pip --version || rm -rf .venv
7170
7271 - name : Install dependencies
73- shell : bash
7472 run : poetry install
7573
74+ - name : Install pytest plugin
75+ run : poetry run pip install pytest-github-actions-annotate-failures
76+
7677 - name : Run pytest
77- shell : bash
78- run : poetry run python -m pytest -q tests/
78+ run : poetry run python -m pytest -p no:sugar -q tests/
0 commit comments