44# './plugin-template --github pulp_python' to update this file.
55#
66# For more info visit https://github.com/pulp/plugin_template
7+
78---
89name : Python CI
910on : {pull_request: {branches: ['*']}}
3334 - name : Check commit message
3435 if : github.event_name == 'pull_request'
3536 env :
37+ PY_COLORS : ' 1'
38+ ANSIBLE_FORCE_COLOR : ' 1'
39+ GITHUB_PULL_REQUEST : ${{ github.event.number }}
40+ GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
41+ GITHUB_BRANCH : ${{ github.head_ref }}
42+ GITHUB_REPO_SLUG : ${{ github.repository }}
3643 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3744 GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
3845 run : sh .github/workflows/scripts/check_commit.sh
@@ -82,30 +89,62 @@ jobs:
8289 sudo apt-get update -yq
8390 sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie
8491 echo ::endgroup::
85- echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
8692 echo "TEST=${{ matrix.env.TEST }}" >> $GITHUB_ENV
93+ echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
94+ echo "FROM_PULP_PYTHON_BRANCH=${{ matrix.FROM_PULP_PYTHON_BRANCH }}" >> $GITHUB_ENV
95+ echo "FROM_PULPCORE_BRANCH=${{ matrix.FROM_PULPCORE_BRANCH }}" >> $GITHUB_ENV
8796
8897 - name : Before Install
98+
8999 run : .github/workflows/scripts/before_install.sh
90100 shell : bash
101+ env :
102+ PY_COLORS : ' 1'
103+ ANSIBLE_FORCE_COLOR : ' 1'
104+ GITHUB_PULL_REQUEST : ${{ github.event.number }}
105+ GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
106+ GITHUB_BRANCH : ${{ github.head_ref }}
107+ GITHUB_REPO_SLUG : ${{ github.repository }}
108+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
109+ GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
91110
92111 - name : Install
112+
93113 run : .github/workflows/scripts/install.sh
114+ shell : bash
94115 env :
95116 PY_COLORS : ' 1'
96117 ANSIBLE_FORCE_COLOR : ' 1'
97- shell : bash
118+ GITHUB_PULL_REQUEST : ${{ github.event.number }}
119+ GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
120+ GITHUB_BRANCH : ${{ github.head_ref }}
121+ GITHUB_REPO_SLUG : ${{ github.repository }}
122+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
123+ GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
98124
99125 - name : Install Python client
126+
100127 run : .github/workflows/scripts/install_python_client.sh
128+ shell : bash
101129
102130 - name : Install Ruby client
103131 if : ${{ env.TEST == 'bindings' }}
104132 run : .github/workflows/scripts/install_ruby_client.sh
133+ shell : bash
105134
106135 - name : Before Script
107- run : |
108- .github/workflows/scripts/before_script.sh
136+
137+ run : .github/workflows/scripts/before_script.sh
138+ shell : bash
139+ env :
140+ PY_COLORS : ' 1'
141+ ANSIBLE_FORCE_COLOR : ' 1'
142+ GITHUB_PULL_REQUEST : ${{ github.event.number }}
143+ GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
144+ GITHUB_BRANCH : ${{ github.head_ref }}
145+ GITHUB_REPO_SLUG : ${{ github.repository }}
146+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
147+ GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
109148
110149 - name : Setting secrets
111150 if : github.event_name != 'pull_request'
@@ -114,13 +153,18 @@ jobs:
114153 SECRETS_CONTEXT : ${{ toJson(secrets) }}
115154
116155 - name : Script
156+
117157 run : .github/workflows/scripts/script.sh
118158 shell : bash
119- # env vars useful for post_script.sh when present
120159 env :
160+ PY_COLORS : ' 1'
161+ ANSIBLE_FORCE_COLOR : ' 1'
121162 GITHUB_PULL_REQUEST : ${{ github.event.number }}
163+ GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
122164 GITHUB_BRANCH : ${{ github.head_ref }}
123165 GITHUB_REPO_SLUG : ${{ github.repository }}
166+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
167+ GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
124168
125169 - name : After failure
126170 if : failure()
@@ -140,6 +184,8 @@ jobs:
140184 strategy :
141185 fail-fast : false
142186 matrix :
187+ env :
188+ - TEST : upgrade
143189 include :
144190 - FROM_PULPCORE_BRANCH : " 3.11"
145191 FROM_PULP_PYTHON_BRANCH : " 3.2"
@@ -161,7 +207,7 @@ jobs:
161207 sudo apt-get update -yq
162208 sudo -E apt-get -yq --no-install-suggests --no-install-recommends install httpie
163209 echo ::endgroup::
164- echo "TEST=upgrade " >> $GITHUB_ENV
210+ echo "TEST=${{ matrix.env.TEST }} " >> $GITHUB_ENV
165211 echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
166212 echo "FROM_PULP_PYTHON_BRANCH=${{ matrix.FROM_PULP_PYTHON_BRANCH }}" >> $GITHUB_ENV
167213 echo "FROM_PULPCORE_BRANCH=${{ matrix.FROM_PULPCORE_BRANCH }}" >> $GITHUB_ENV
@@ -173,33 +219,76 @@ jobs:
173219 echo ::endgroup::
174220
175221 - name : Before Install
222+
176223 run : .github/workflows/scripts/before_install.sh
177224 shell : bash
225+ env :
226+ PY_COLORS : ' 1'
227+ ANSIBLE_FORCE_COLOR : ' 1'
228+ GITHUB_PULL_REQUEST : ${{ github.event.number }}
229+ GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
230+ GITHUB_BRANCH : ${{ github.head_ref }}
231+ GITHUB_REPO_SLUG : ${{ github.repository }}
232+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
233+ GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
178234
179235 - name : Install
236+
180237 run : .github/workflows/scripts/install.sh
238+ shell : bash
181239 env :
182240 PY_COLORS : ' 1'
183241 ANSIBLE_FORCE_COLOR : ' 1'
184- shell : bash
242+ GITHUB_PULL_REQUEST : ${{ github.event.number }}
243+ GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
244+ GITHUB_BRANCH : ${{ github.head_ref }}
245+ GITHUB_REPO_SLUG : ${{ github.repository }}
246+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
247+ GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
185248
186249 - name : Install Python client
250+
187251 run : .github/workflows/scripts/install_python_client.sh
252+ shell : bash
188253
189254 - name : Before Script
255+
190256 run : .github/workflows/scripts/before_script.sh
257+ shell : bash
258+ env :
259+ PY_COLORS : ' 1'
260+ ANSIBLE_FORCE_COLOR : ' 1'
261+ GITHUB_PULL_REQUEST : ${{ github.event.number }}
262+ GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
263+ GITHUB_BRANCH : ${{ github.head_ref }}
264+ GITHUB_REPO_SLUG : ${{ github.repository }}
265+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
266+ GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
191267
192268 - name : Setting secrets
269+
193270 run : python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
194271 env :
195272 SECRETS_CONTEXT : ${{ toJson(secrets) }}
196273
197- - name : Upgrade test
274+ - name : Upgrade Test
275+
198276 run : .github/workflows/scripts/script.sh
277+ shell : bash
278+ env :
279+ PY_COLORS : ' 1'
280+ ANSIBLE_FORCE_COLOR : ' 1'
281+ GITHUB_PULL_REQUEST : ${{ github.event.number }}
282+ GITHUB_PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
283+ GITHUB_BRANCH : ${{ github.head_ref }}
284+ GITHUB_REPO_SLUG : ${{ github.repository }}
285+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
286+ GITHUB_CONTEXT : ${{ github.event.pull_request.commits_url }}
199287
200288 - name : After failure
201289 if : failure()
202290 run : |
291+ echo "Need to debug? Please check: https://github.com/marketplace/actions/debugging-with-tmate"
203292 http --timeout 30 --check-status --pretty format --print hb https://pulp/pulp/api/v3/status/ || true
204293 docker images || true
205294 docker ps -a || true
0 commit comments