Skip to content

Commit f4b50f3

Browse files
committed
ci: cleanup workflows
1 parent e9fda3b commit f4b50f3

File tree

3 files changed

+30
-52
lines changed

3 files changed

+30
-52
lines changed

.github/workflows/code-quality.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,33 @@ name: Tests
33
on:
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

814
jobs:
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/

.github/workflows/release.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,22 @@ on:
66
- '*.*.*'
77

88
jobs:
9-
Release:
9+
release:
10+
name: Release
1011
runs-on: ubuntu-latest
11-
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v2
1515

16-
- name: Get tag
17-
id: tag
18-
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
19-
2016
- name: Set up Python 3.9
2117
uses: actions/setup-python@v2
2218
with:
2319
python-version: "3.9"
2420

2521
- name: Install Poetry
2622
run: |
27-
curl -sL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py \
28-
| python - -y
23+
curl -sL https://install.python-poetry.org | python - -y ${{ matrix.bootstrap-args }}
24+
2925
- name: Update PATH
3026
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
3127

@@ -37,6 +33,7 @@ jobs:
3733
run: |
3834
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] \
3935
|| echo ::set-output name=prerelease::true
36+
4037
- name: Create Release
4138
uses: ncipollo/release-action@v1
4239
with:

0 commit comments

Comments
 (0)