@@ -13,6 +13,10 @@ concurrency:
13
13
group : ${{ github.ref_name }}-${{ github.workflow }}
14
14
cancel-in-progress : true
15
15
16
+ defaults :
17
+ run :
18
+ working-directory : " pulp_python"
19
+
16
20
jobs :
17
21
18
22
ready-to-ship :
21
25
- uses : actions/checkout@v4
22
26
with :
23
27
fetch-depth : 0
28
+ path : " pulp_python"
24
29
- uses : actions/setup-python@v4
25
30
with :
26
31
python-version : " 3.8"
@@ -31,177 +36,27 @@ jobs:
31
36
env :
32
37
PY_COLORS : ' 1'
33
38
ANSIBLE_FORCE_COLOR : ' 1'
34
- GITHUB_PULL_REQUEST : ${{ github.event.number }}
35
- GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
36
- GITHUB_BRANCH : ${{ github.head_ref }}
37
- GITHUB_REPO_SLUG : ${{ github.repository }}
38
39
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
40
GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
40
41
run : sh .github/workflows/scripts/check_commit.sh
41
42
- name : Verify requirements files
42
43
run : python .ci/scripts/check_requirements.py
43
- single_commit :
44
- runs-on : ubuntu-latest
45
- name : Assert single commit
46
- if : github.base_ref == 'main'
47
- steps :
48
- - uses : actions/checkout@v4
49
- with :
50
- fetch-depth : 0
51
- - name : Checkout main
52
- run : git fetch origin main
53
- - name : create local main branch
54
- run : git branch main origin/main
55
- - name : Commit Count Check
56
- run : test `git log --oneline --no-merges HEAD ^main | wc -l ` = 1
57
44
58
45
lint :
59
- runs-on : ubuntu-latest
60
-
61
- steps :
62
- - uses : actions/checkout@v4
63
- with :
64
- fetch-depth : 1
65
- - uses : actions/setup-python@v4
66
- with :
67
- python-version : " 3.8"
68
- # lint_requirements contains tools needed for flake8, etc.
69
- - name : Install requirements
70
- run : pip3 install -r lint_requirements.txt
71
-
72
-
46
+ uses : " ./.github/workflows/lint.yml"
73
47
74
- # Lint code.
75
- - name : Run flake8
76
- run : flake8
77
-
78
- - name : Run extra lint checks
79
- run : " [ ! -x .ci/scripts/extra_linting.sh ] || .ci/scripts/extra_linting.sh"
80
-
81
- # check for any files unintentionally left out of MANIFEST.in
82
- - name : Check manifest
83
- run : check-manifest
84
-
85
- - name : Check for pulpcore imports outside of pulpcore.plugin
86
- run : sh .ci/scripts/check_pulpcore_imports.sh
87
-
88
- - name : Check for gettext problems
89
- run : sh .ci/scripts/check_gettext.sh
90
-
91
- test :
92
- runs-on : ubuntu-latest
93
- # run only after lint finishes
48
+ build :
94
49
needs : lint
95
- strategy :
96
- fail-fast : false
97
- matrix :
98
- env :
99
- - TEST : pulp
100
- - TEST : docs
101
- - TEST : azure
102
- - TEST : s3
103
- - TEST : lowerbounds
104
- outputs :
105
- deprecations-pulp : ${{ steps.deprecations.outputs.deprecations-pulp }}
106
- deprecations-azure : ${{ steps.deprecations.outputs.deprecations-azure }}
107
- deprecations-s3 : ${{ steps.deprecations.outputs.deprecations-s3 }}
108
- deprecations-lowerbounds : ${{ steps.deprecations.outputs.deprecations-lowerbounds }}
50
+ uses : " ./.github/workflows/build.yml"
109
51
110
- steps :
111
- - uses : actions/checkout@v4
112
- with :
113
- fetch-depth : 1
114
-
115
- - uses : actions/setup-python@v4
116
- with :
117
- python-version : " 3.8"
118
-
119
- - name : Install httpie
120
- run : |
121
- echo ::group::HTTPIE
122
- pip install httpie
123
- echo ::endgroup::
124
- echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
125
-
126
- - name : Set environment variables
127
- run : |
128
- echo "TEST=${{ matrix.env.TEST }}" >> $GITHUB_ENV
129
-
130
- - name : Before Install
131
- run : .github/workflows/scripts/before_install.sh
132
- shell : bash
133
- env :
134
- PY_COLORS : ' 1'
135
- ANSIBLE_FORCE_COLOR : ' 1'
136
- GITHUB_PULL_REQUEST : ${{ github.event.number }}
137
- GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
138
- GITHUB_BRANCH : ${{ github.head_ref }}
139
- GITHUB_REPO_SLUG : ${{ github.repository }}
140
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
141
- GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
142
-
143
- - name : Install
144
- run : .github/workflows/scripts/install.sh
145
- shell : bash
146
- env :
147
- PY_COLORS : ' 1'
148
- ANSIBLE_FORCE_COLOR : ' 1'
149
- GITHUB_PULL_REQUEST : ${{ github.event.number }}
150
- GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
151
- GITHUB_BRANCH : ${{ github.head_ref }}
152
- GITHUB_REPO_SLUG : ${{ github.repository }}
153
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
154
- GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
155
-
156
- - name : Before Script
157
- run : .github/workflows/scripts/before_script.sh
158
- shell : bash
159
- env :
160
- PY_COLORS : ' 1'
161
- ANSIBLE_FORCE_COLOR : ' 1'
162
- GITHUB_PULL_REQUEST : ${{ github.event.number }}
163
- GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
164
- GITHUB_BRANCH : ${{ github.head_ref }}
165
- GITHUB_REPO_SLUG : ${{ github.repository }}
166
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
167
- GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
168
- REDIS_DISABLED : ${{ contains('', matrix.env.TEST) }}
169
-
170
- - name : Setting secrets
171
- if : github.event_name != 'pull_request'
172
- run : python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
173
- env :
174
- SECRETS_CONTEXT : ${{ toJson(secrets) }}
175
-
176
- - name : Script
177
- run : .github/workflows/scripts/script.sh
178
- shell : bash
179
- env :
180
- PY_COLORS : ' 1'
181
- ANSIBLE_FORCE_COLOR : ' 1'
182
- GITHUB_PULL_REQUEST : ${{ github.event.number }}
183
- GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
184
- GITHUB_BRANCH : ${{ github.head_ref }}
185
- GITHUB_REPO_SLUG : ${{ github.repository }}
186
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
187
- GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
188
-
189
- - name : Extract Deprecations from Logs
190
- id : deprecations
191
- run : echo deprecations-${{ matrix.env.TEST }}=$(docker logs pulp 2>&1 | grep -i pulpcore.deprecation | base64 -w 0) >> $GITHUB_OUTPUT
52
+ test :
53
+ needs : build
54
+ uses : " ./.github/workflows/test.yml"
192
55
193
- - name : Logs
194
- if : always()
195
- run : |
196
- echo "Need to debug? Please check: https://github.com/marketplace/actions/debugging-with-tmate"
197
- http --timeout 30 --check-status --pretty format --print hb "https://pulp${PULP_API_ROOT}api/v3/status/" || true
198
- docker images || true
199
- docker ps -a || true
200
- docker logs pulp || true
201
- docker exec pulp ls -latr /etc/yum.repos.d/ || true
202
- docker exec pulp cat /etc/yum.repos.d/* || true
203
- docker exec pulp bash -c "pip3 list && pip3 install pipdeptree && pipdeptree"
204
56
deprecations :
57
+ defaults :
58
+ run :
59
+ working-directory : " ."
205
60
runs-on : ubuntu-latest
206
61
if : github.base_ref == 'main'
207
62
needs : test
219
74
echo "${{ needs.test.outputs.deprecations-azure }}" | base64 -d
220
75
echo "${{ needs.test.outputs.deprecations-s3 }}" | base64 -d
221
76
echo "${{ needs.test.outputs.deprecations-lowerbounds }}" | base64 -d
222
-
223
-
0 commit comments