-
Notifications
You must be signed in to change notification settings - Fork 6
96 lines (72 loc) · 2.23 KB
/
ci.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
defaults:
run:
shell: "bash"
name: "CI"
on:
push:
branches: ["main"]
tags: ["v*"]
pull_request:
branches: ["main"]
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
jobs:
dev:
name: "Verify package is installed well"
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
runs-on: "${{ matrix.os }}"
steps:
- uses: "actions/[email protected]"
- id: "python_and_poetry"
uses: "./.github/actions/install_python_and_poetry"
with:
cache-key-suffix: "-main"
python-version-file: ".python-version"
- name: "Install package"
run: "poetry install --only main"
- name: "Import package"
run: "poetry run python3 -c 'import aiohttp_middlewares'"
docs:
uses: "./.github/workflows/ci_verify_docs_build.yml"
test:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-rc.1"]
include:
- python-version: "3.12"
dev: "true"
name: "Python ${{ matrix.python-version }}"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/[email protected]"
- id: "python_and_poetry"
uses: "./.github/actions/install_python_and_poetry"
with:
cache-key-suffix: "-dev-test"
python-version: "${{ matrix.python-version }}"
- if: "${{ matrix.dev == 'true' }}"
uses: "./.github/actions/run_pre_commit"
with:
python-version: "${{ steps.python_and_poetry.outputs.python-version }}"
- uses: "./.github/actions/run_tox"
with:
python-path: "${{ steps.python_and_poetry.outputs.python-path }}"
python-version: "${{ steps.python_and_poetry.outputs.python-version }}"
use-coveralls: "${{ matrix.dev }}"
coveralls-token: "${{ secrets.GITHUB_TOKEN }}"
package:
needs: ["test"]
permissions:
id-token: "write"
uses: "./.github/workflows/ci_package.yml"
release:
needs: ["package"]
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
uses: "./.github/workflows/ci_release.yml"
secrets:
release-token: "${{ secrets.GITHUB_TOKEN }}"