[PR #754/86ad5111 backport][0.18] Made api quirks idempotent #2461
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
env: | |
COLORTERM: 'yes' | |
TERM: 'xterm-256color' | |
PYTEST_ADDOPTS: '--color=yes' | |
CONTAINER_RUNTIME: 'docker' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: | |
- "3.7" | |
- "3.10" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install python dependencies | |
run: | | |
pip install -r test_requirements.txt | |
- name: Lint code | |
run: make lint | |
test: | |
runs-on: ubuntu-20.04 | |
needs: | |
- lint | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python: "3.11" | |
image_tag: "nightly" | |
pulp_api_root: "/relocated/djnd/" | |
- python: "3.6" | |
image_tag: "3.21" | |
- python: "3.7" | |
image_tag: "3.20" | |
click_version: "8.0.0" | |
- python: "3.8" | |
image_tag: "3.19" | |
- python: "3.9" | |
image_tag: "3.18" | |
pulp_api_root: "/relocated/djnd/" | |
- python: "3.10" | |
image_tag: "3.22" | |
click_version: "8.0.0" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Test Dependencies | |
run: | | |
if [ "${{matrix.click_version}}" ] | |
then | |
pip install -r test_requirements.txt click~=${{ matrix.click_version }} | |
else | |
pip install -r test_requirements.txt | |
fi | |
- name: Run tests | |
env: | |
CONTAINER_RUNTIME: ${{ matrix.container_runtime }} | |
IMAGE_TAG: ${{ matrix.image_tag }} | |
FROM_TAG: ${{ matrix.from_tag }} | |
CONTAINER_FILE: ${{ matrix.container_file }} | |
PULP_API_ROOT: ${{ matrix.pulp_api_root }} | |
run: .ci/run_container.sh make test | |
ready-to-ship: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
git fetch --prune --unshallow | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install python dependencies | |
run: | | |
pip install toml pygithub | |
- name: Check commit message | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }} | |
run: | | |
for sha in $(curl -H "Authorization: token $GITHUB_TOKEN" $GITHUB_CONTEXT | jq '.[].sha' | sed 's/"//g') | |
do | |
python .ci/scripts/validate_commit_message.py $sha | |
VALUE=$? | |
if [ "$VALUE" -gt 0 ]; then | |
exit $VALUE | |
fi | |
done | |
shell: bash |