AAP-79229 Make candidates deterministic, aim for managed as has better support in legacy RBAC #7154
Workflow file for this run
This file contains hidden or 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: | |
| push: | |
| branches: | |
| - devel | |
| - "stable-*" | |
| jobs: | |
| tox: | |
| name: django-ansible-base - ${{ matrix.tests.env }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tests: | |
| - env: py312-check | |
| python-version: "3.12" | |
| sonar: false | |
| junit-xml-upload: false | |
| - env: py312 | |
| python-version: "3.12" | |
| sonar: true | |
| junit-xml-upload: true | |
| - env: py312-sqlite | |
| python-version: "3.12" | |
| sonar: false | |
| junit-xml-upload: false | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| show-progress: false | |
| persist-credentials: false | |
| - name: Install build requirements | |
| run: sudo apt-get update && sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev libxmlsec1-dev | |
| - name: Install python ${{ matrix.tests.python-version }} | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: ${{ matrix.tests.python-version }} | |
| - name: Install tox | |
| run: pip${{ matrix.tests.python-version }} install tox tox-docker | |
| - name: Run tox | |
| env: | |
| TOX_DOCKER_GATEWAY: "127.0.0.1" | |
| run: | | |
| echo "::remove-matcher owner=python::" # Disable annoying annotations from setup-python | |
| tox --colored yes -e ${{ matrix.tests.env }} | |
| - name: Inject PR number into coverage.xml | |
| if: matrix.tests.env != 'check' && hashFiles('coverage.xml') != '' | |
| run: sed -i '2i <!-- PR ${{ github.event.number }} -->' coverage.xml | |
| - name: Upload coverage as artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: matrix.tests.env != 'check' && hashFiles('coverage.xml') != '' | |
| with: | |
| name: coverage-${{ matrix.tests.env }} | |
| path: coverage.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| if: matrix.tests.env != 'check' && hashFiles('coverage.xml') != '' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| flags: ${{ matrix.tests.env }} | |
| fail_ci_if_error: false | |
| - name: Upload jUnit XML test results | |
| if: matrix.tests.junit-xml-upload && github.event_name == 'push' && github.repository == 'ansible/django-ansible-base' && github.ref_name == 'devel' | |
| continue-on-error: true | |
| run: >- | |
| curl --silent --show-error --user "$PDE_UPLOAD_USER:$PDE_UPLOAD_PASSWORD" | |
| --form "xunit_xml=@django-ansible-base-test-results.xml" | |
| --form "component_name=django-ansible-base" | |
| --form "git_commit_sha=${{ github.sha }}" | |
| --form "git_repository_url=https://github.com/${{ github.repository }}" | |
| "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}/api/results/upload/" | |
| env: | |
| PDE_UPLOAD_USER: ${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }} | |
| PDE_UPLOAD_PASSWORD: ${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }} | |
| canary-deps: | |
| name: "Canary (unpinned deps, may fail) - ${{ matrix.tests.env }}" | |
| if: >- | |
| github.repository == 'ansible/django-ansible-base' | |
| && ( | |
| (github.event_name == 'push' && github.ref_name == 'devel') | |
| || (github.event_name == 'pull_request' && github.base_ref == 'devel') | |
| ) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| tests: | |
| - env: py312-in-files | |
| python-version: "3.12" | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| show-progress: false | |
| persist-credentials: false | |
| - name: Install build requirements | |
| run: sudo apt-get update && sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev libxmlsec1-dev | |
| - name: Install python ${{ matrix.tests.python-version }} | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: ${{ matrix.tests.python-version }} | |
| - name: Install tox | |
| run: pip${{ matrix.tests.python-version }} install tox tox-docker | |
| - name: Run tox | |
| env: | |
| TOX_DOCKER_GATEWAY: "127.0.0.1" | |
| run: | | |
| echo "::remove-matcher owner=python::" | |
| tox --colored yes -e ${{ matrix.tests.env }} |