1
1
---
2
2
name : CI/CD
3
3
4
+ permissions : {}
5
+
4
6
on :
5
7
merge_group :
6
8
push :
22
24
23
25
jobs :
24
26
build :
25
- name : Build distribution 📦
26
- runs-on : ubuntu-24.04
27
- timeout-minutes : 5
28
-
29
- steps :
30
- - uses : actions/checkout@v4
31
- - name : Install uv
32
- uses : astral-sh/setup-uv@v5
33
- - name : Build distribution 📦
34
- run : uv build
35
- - name : Check distribution 📦
36
- run : uvx twine check --strict dist/*
37
- - name : Upload distribution 📦
38
- uses : actions/upload-artifact@v4
39
- with :
40
- name : python-package-distributions
41
- path : dist/
27
+ uses : ./.github/workflows/reusable-build.yml
42
28
43
29
test :
44
- name : Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
45
- runs-on : ${{ matrix.os }}
46
- continue-on-error : ${{ matrix.experimental }}
47
30
strategy :
48
31
matrix :
49
32
python-version :
@@ -67,49 +50,35 @@ jobs:
67
50
python-version : 3.11
68
51
os : ubuntu-24.04
69
52
fail-fast : false
70
- env :
71
- UV_FROZEN : 1
72
- timeout-minutes : 5
53
+ uses : ./.github/workflows/reusable-test.yml
54
+ with :
55
+ python-version : ${{ matrix.python-version }}
56
+ os : ${{ matrix.os }}
57
+ continue-on-error : ${{ matrix.experimental }}
58
+ enable-cache : ${{ github.ref_type == 'tag' && 'false' || 'auto' }}
59
+ upload-coverage : ${{ matrix.upload-coverage }}
60
+ secrets :
61
+ # yamllint disable-line rule:line-length
62
+ codecov-token : ${{ matrix.upload-coverage && secrets.CODECOV_TOKEN || '' }}
73
63
74
- steps :
75
- - name : Checkout
76
- uses : actions/checkout@v4
77
- with :
78
- submodules : true
79
- - name : Install uv
80
- uses : astral-sh/setup-uv@v5
81
- with :
82
- python-version : ${{ matrix.python-version }}
83
- - name : Run pre-commit hooks
84
- run : |
85
- uv run make pre-commit
86
- - name : Run unittests
87
- env :
88
- COLOR : ' yes'
89
- run : |
90
- uv run make mototest
91
- - name : Upload coverage to Codecov
92
- if : ${{ matrix.upload-coverage }}
93
- uses : codecov/codecov-action@v5.4.2
94
- with :
95
- token : ${{ secrets.CODECOV_TOKEN }} # not required for public repos
96
- files : ./coverage.xml
97
- flags : unittests # optional
98
- name : codecov-umbrella # optional
99
- fail_ci_if_error : true # optional (default = false)
100
- verbose : true # optional (default = false)
64
+ zizmor :
65
+ uses : ./.github/workflows/reusable-zizmor.yml
66
+ permissions :
67
+ security-events : write
101
68
102
69
check : # This job does nothing and is only used for the branch protection
103
70
if : always()
104
71
needs :
105
72
- build
106
73
- test
74
+ - zizmor
107
75
runs-on : ubuntu-24.04
108
76
timeout-minutes : 5
109
77
110
78
steps :
111
79
- name : Decide whether the needed jobs succeeded or failed
112
- uses : re-actors/alls-green@release/v1
80
+ # yamllint disable-line rule:line-length
81
+ uses : re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
113
82
with :
114
83
jobs : ${{ toJSON(needs) }}
115
84
@@ -135,7 +104,10 @@ jobs:
135
104
path : dist/
136
105
- name : Check if distribution 📦 names match git tag
137
106
run : |
138
- test -f "dist/aiobotocore-${{ github.ref_name }}.tar.gz"
139
- test -f "dist/aiobotocore-${{ github.ref_name }}-py3-none-any.whl"
107
+ test -f "dist/aiobotocore-${REF_NAME}.tar.gz"
108
+ test -f "dist/aiobotocore-${REF_NAME}-py3-none-any.whl"
109
+ env :
110
+ REF_NAME : ${{ github.ref_name }}
140
111
- name : Publish distribution 📦 to PyPI
141
- uses : pypa/gh-action-pypi-publish@release/v1
112
+ # yamllint disable-line rule:line-length
113
+ uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
0 commit comments