diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c55377efdd88..346458bdf460 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -522,6 +522,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -540,6 +541,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -558,6 +560,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -576,6 +579,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -594,6 +598,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -612,6 +617,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -630,6 +636,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -648,6 +655,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -666,6 +674,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -684,6 +693,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -702,6 +712,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -720,6 +731,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -738,6 +750,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -756,6 +769,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -774,6 +788,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -792,6 +807,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -810,6 +826,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -828,6 +845,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -846,6 +864,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -864,6 +883,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} @@ -881,6 +901,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -899,6 +920,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -917,6 +939,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -935,6 +958,7 @@ jobs: nox-session: ci-test-onedir platform: darwin arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -953,6 +977,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -971,6 +996,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -989,6 +1015,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1007,6 +1034,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1025,6 +1053,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1043,6 +1072,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1061,6 +1091,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1079,6 +1110,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1097,6 +1129,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1115,6 +1148,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1133,6 +1167,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1151,6 +1186,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1169,6 +1205,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1187,6 +1224,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1205,6 +1243,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1223,6 +1262,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1241,6 +1281,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1259,6 +1300,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1277,12 +1319,81 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }} skip-junit-reports: ${{ github.event_name == 'pull_request' }} + combine-all-code-coverage: + name: Combine Code Coverage + if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} + runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + needs: + - prepare-workflow + - windows-2016 + - windows-2019 + - windows-2022 + - macos-12 + - almalinux-8 + - almalinux-9 + - amazonlinux-2 + - archlinux-lts + - centos-7 + - centosstream-8 + - centosstream-9 + - debian-10 + - debian-11 + - debian-11-arm64 + - fedora-37 + - fedora-38 + - opensuse-15 + - photonos-3 + - photonos-4 + - ubuntu-2004 + - ubuntu-2004-arm64 + - ubuntu-2204 + - ubuntu-2204-arm64 + steps: + - uses: actions/checkout@v3 + + - name: Set up Python 3.10 + if: ${{ github.event.repository.private == false }} + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install Nox + run: | + python3 -m pip install 'nox==2022.8.7' + + - name: Get coverage reports + id: get-coverage-reports + uses: actions/download-artifact@v3 + with: + name: all-testrun-coverage-artifacts + path: artifacts/coverage/ + + - name: Display structure of downloaded files + run: tree -a artifacts/ + + - name: Combine Code Coverage + run: | + nox --force-color -e combine-coverage + + - name: Create Code Coverage HTML Report + run: | + nox --force-color -e create-html-coverage-report + + - name: Upload Code Coverage HTML Report + uses: actions/upload-artifact@v3 + with: + name: code-coverage-html-report + path: artifacts/coverage/html + retention-days: 7 + if-no-files-found: error + set-pipeline-exit-status: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all @@ -1296,6 +1407,7 @@ jobs: - build-docs - build-deps-onedir - build-salt-onedir + - combine-all-code-coverage - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ae20b22fc7d8..938785c3d236 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -577,6 +577,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -595,6 +596,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -613,6 +615,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -631,6 +634,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -649,6 +653,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -667,6 +672,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -685,6 +691,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -703,6 +710,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -721,6 +729,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -739,6 +748,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -757,6 +767,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -775,6 +786,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -793,6 +805,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -811,6 +824,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -829,6 +843,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -847,6 +862,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -865,6 +881,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -883,6 +900,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -901,6 +919,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -919,6 +938,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -936,6 +956,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -954,6 +975,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -972,6 +994,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -990,6 +1013,7 @@ jobs: nox-session: ci-test-onedir platform: darwin arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1008,6 +1032,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1026,6 +1051,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1044,6 +1070,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1062,6 +1089,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1080,6 +1108,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1098,6 +1127,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1116,6 +1146,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1134,6 +1165,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1152,6 +1184,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1170,6 +1203,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1188,6 +1222,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1206,6 +1241,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1224,6 +1260,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1242,6 +1279,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1260,6 +1298,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1278,6 +1317,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1296,6 +1336,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1314,6 +1355,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1332,12 +1374,81 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false + combine-all-code-coverage: + name: Combine Code Coverage + if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} + runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + needs: + - prepare-workflow + - windows-2016 + - windows-2019 + - windows-2022 + - macos-12 + - almalinux-8 + - almalinux-9 + - amazonlinux-2 + - archlinux-lts + - centos-7 + - centosstream-8 + - centosstream-9 + - debian-10 + - debian-11 + - debian-11-arm64 + - fedora-37 + - fedora-38 + - opensuse-15 + - photonos-3 + - photonos-4 + - ubuntu-2004 + - ubuntu-2004-arm64 + - ubuntu-2204 + - ubuntu-2204-arm64 + steps: + - uses: actions/checkout@v3 + + - name: Set up Python 3.10 + if: ${{ github.event.repository.private == false }} + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install Nox + run: | + python3 -m pip install 'nox==2022.8.7' + + - name: Get coverage reports + id: get-coverage-reports + uses: actions/download-artifact@v3 + with: + name: all-testrun-coverage-artifacts + path: artifacts/coverage/ + + - name: Display structure of downloaded files + run: tree -a artifacts/ + + - name: Combine Code Coverage + run: | + nox --force-color -e combine-coverage + + - name: Create Code Coverage HTML Report + run: | + nox --force-color -e create-html-coverage-report + + - name: Upload Code Coverage HTML Report + uses: actions/upload-artifact@v3 + with: + name: code-coverage-html-report + path: artifacts/coverage/html + retention-days: 7 + if-no-files-found: error + build-src-repo: name: Build Source Repository environment: nightly @@ -2057,6 +2168,7 @@ jobs: - build-docs - build-deps-onedir - build-salt-onedir + - combine-all-code-coverage - publish-repositories - amazonlinux-2-pkg-tests - centos-7-pkg-tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc96898061ad..bcdb854cdcb0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -238,6 +238,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -258,6 +259,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -278,6 +280,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -298,6 +301,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -318,6 +322,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -338,6 +343,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -358,6 +364,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -378,6 +385,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -398,6 +406,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -418,6 +427,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -438,6 +448,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -458,6 +469,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -478,6 +490,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -498,6 +511,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -518,6 +532,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -538,6 +553,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -558,6 +574,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -578,6 +595,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -598,6 +616,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -618,6 +637,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -638,6 +658,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -658,6 +679,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -678,6 +700,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -698,6 +721,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -718,6 +742,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -738,6 +763,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: onedir @@ -758,6 +784,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: onedir @@ -779,6 +806,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package secrets: inherit @@ -799,6 +827,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: onedir secrets: inherit @@ -820,6 +849,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" secrets: inherit @@ -840,6 +870,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" secrets: inherit @@ -860,6 +891,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: release skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" secrets: inherit diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 9a22472b2da3..0301eaf41b86 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -556,6 +556,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -574,6 +575,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -592,6 +594,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -610,6 +613,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -628,6 +632,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -646,6 +651,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -664,6 +670,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -682,6 +689,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -700,6 +708,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -718,6 +727,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -736,6 +746,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -754,6 +765,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -772,6 +784,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -790,6 +803,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -808,6 +822,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -826,6 +841,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -844,6 +860,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -862,6 +879,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -880,6 +898,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -898,6 +917,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false @@ -915,6 +935,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -933,6 +954,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -951,6 +973,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -969,6 +992,7 @@ jobs: nox-session: ci-test-onedir platform: darwin arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -987,6 +1011,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1005,6 +1030,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1023,6 +1049,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1041,6 +1068,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1059,6 +1087,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1077,6 +1106,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1095,6 +1125,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1113,6 +1144,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1131,6 +1163,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1149,6 +1182,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1167,6 +1201,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1185,6 +1220,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1203,6 +1239,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1221,6 +1258,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1239,6 +1277,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1257,6 +1296,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1275,6 +1315,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1293,6 +1334,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1311,12 +1353,81 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: false skip-junit-reports: false + combine-all-code-coverage: + name: Combine Code Coverage + if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} + runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + needs: + - prepare-workflow + - windows-2016 + - windows-2019 + - windows-2022 + - macos-12 + - almalinux-8 + - almalinux-9 + - amazonlinux-2 + - archlinux-lts + - centos-7 + - centosstream-8 + - centosstream-9 + - debian-10 + - debian-11 + - debian-11-arm64 + - fedora-37 + - fedora-38 + - opensuse-15 + - photonos-3 + - photonos-4 + - ubuntu-2004 + - ubuntu-2004-arm64 + - ubuntu-2204 + - ubuntu-2204-arm64 + steps: + - uses: actions/checkout@v3 + + - name: Set up Python 3.10 + if: ${{ github.event.repository.private == false }} + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install Nox + run: | + python3 -m pip install 'nox==2022.8.7' + + - name: Get coverage reports + id: get-coverage-reports + uses: actions/download-artifact@v3 + with: + name: all-testrun-coverage-artifacts + path: artifacts/coverage/ + + - name: Display structure of downloaded files + run: tree -a artifacts/ + + - name: Combine Code Coverage + run: | + nox --force-color -e combine-coverage + + - name: Create Code Coverage HTML Report + run: | + nox --force-color -e create-html-coverage-report + + - name: Upload Code Coverage HTML Report + uses: actions/upload-artifact@v3 + with: + name: code-coverage-html-report + path: artifacts/coverage/html + retention-days: 7 + if-no-files-found: error + set-pipeline-exit-status: # This step is just so we can make github require this step, to pass checks # on a pull request instead of requiring all @@ -1332,6 +1443,7 @@ jobs: - build-docs - build-deps-onedir - build-salt-onedir + - combine-all-code-coverage - windows-2016 - windows-2019 - windows-2022 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 245b1bf1cefa..7541fc7e6736 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -572,6 +572,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -590,6 +591,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -608,6 +610,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -626,6 +629,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -644,6 +648,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -662,6 +667,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -680,6 +686,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -698,6 +705,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -716,6 +724,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: rpm + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -734,6 +743,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -752,6 +762,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -770,6 +781,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -788,6 +800,7 @@ jobs: arch: aarch64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: deb + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -806,6 +819,7 @@ jobs: arch: x86_64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -824,6 +838,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -842,6 +857,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -860,6 +876,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -878,6 +895,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -896,6 +914,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: NSIS + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -914,6 +933,7 @@ jobs: arch: amd64 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: MSI + nox-version: 2022.8.7 cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true @@ -931,6 +951,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -949,6 +970,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -967,6 +989,7 @@ jobs: nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -985,6 +1008,7 @@ jobs: nox-session: ci-test-onedir platform: darwin arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1003,6 +1027,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1021,6 +1046,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1039,6 +1065,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1057,6 +1084,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1075,6 +1103,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1093,6 +1122,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1111,6 +1141,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1129,6 +1160,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1147,6 +1179,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1165,6 +1198,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1183,6 +1217,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1201,6 +1236,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1219,6 +1255,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1237,6 +1274,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1255,6 +1293,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1273,6 +1312,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1291,6 +1331,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1309,6 +1350,7 @@ jobs: nox-session: ci-test-onedir platform: linux arch: x86_64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 @@ -1327,12 +1369,81 @@ jobs: nox-session: ci-test-onedir platform: linux arch: aarch64 + nox-version: 2022.8.7 testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 skip-code-coverage: true skip-junit-reports: true + combine-all-code-coverage: + name: Combine Code Coverage + if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} + runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + needs: + - prepare-workflow + - windows-2016 + - windows-2019 + - windows-2022 + - macos-12 + - almalinux-8 + - almalinux-9 + - amazonlinux-2 + - archlinux-lts + - centos-7 + - centosstream-8 + - centosstream-9 + - debian-10 + - debian-11 + - debian-11-arm64 + - fedora-37 + - fedora-38 + - opensuse-15 + - photonos-3 + - photonos-4 + - ubuntu-2004 + - ubuntu-2004-arm64 + - ubuntu-2204 + - ubuntu-2204-arm64 + steps: + - uses: actions/checkout@v3 + + - name: Set up Python 3.10 + if: ${{ github.event.repository.private == false }} + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install Nox + run: | + python3 -m pip install 'nox==2022.8.7' + + - name: Get coverage reports + id: get-coverage-reports + uses: actions/download-artifact@v3 + with: + name: all-testrun-coverage-artifacts + path: artifacts/coverage/ + + - name: Display structure of downloaded files + run: tree -a artifacts/ + + - name: Combine Code Coverage + run: | + nox --force-color -e combine-coverage + + - name: Create Code Coverage HTML Report + run: | + nox --force-color -e create-html-coverage-report + + - name: Upload Code Coverage HTML Report + uses: actions/upload-artifact@v3 + with: + name: code-coverage-html-report + path: artifacts/coverage/html + retention-days: 7 + if-no-files-found: error + build-src-repo: name: Build Source Repository environment: staging @@ -2094,6 +2205,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2113,6 +2225,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2132,6 +2245,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2151,6 +2265,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2170,6 +2285,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2189,6 +2305,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2208,6 +2325,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2227,6 +2345,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2246,6 +2365,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2265,6 +2385,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2284,6 +2405,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2303,6 +2425,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2322,6 +2445,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2341,6 +2465,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2360,6 +2485,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2379,6 +2505,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2398,6 +2525,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2417,6 +2545,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2436,6 +2565,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2455,6 +2585,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2474,6 +2605,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2493,6 +2625,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2512,6 +2645,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2531,6 +2665,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2550,6 +2685,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package @@ -2569,6 +2705,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: onedir @@ -2588,6 +2725,7 @@ jobs: cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.12 salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging + nox-version: 2022.8.7 skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: onedir @@ -2608,6 +2746,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: package secrets: inherit @@ -2627,6 +2766,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: onedir secrets: inherit @@ -2647,6 +2787,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" secrets: inherit @@ -2666,6 +2807,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" secrets: inherit @@ -2685,6 +2827,7 @@ jobs: salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: staging skip-code-coverage: true + nox-version: 2022.8.7 latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" secrets: inherit @@ -2830,6 +2973,7 @@ jobs: - build-docs - build-deps-onedir - build-salt-onedir + - combine-all-code-coverage - publish-repositories - upload-release-artifacts - publish-pypi diff --git a/.github/workflows/templates/ci.yml.jinja b/.github/workflows/templates/ci.yml.jinja index 405aefe53ee8..47ef0b753c4f 100644 --- a/.github/workflows/templates/ci.yml.jinja +++ b/.github/workflows/templates/ci.yml.jinja @@ -313,4 +313,53 @@ <%- include "test-salt.yml.jinja" %> <%- endif %> + combine-all-code-coverage: + <%- do conclusion_needs.append("combine-all-code-coverage") %> + name: Combine Code Coverage + if: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] == false }} + runs-on: ${{ github.event.repository.private && fromJSON('["self-hosted", "linux", "x86_64"]') || 'ubuntu-latest' }} + needs: + - prepare-workflow + <%- for need in test_salt_needs.iter(consume=False) %> + - <{ need }> + <%- endfor %> + steps: + - uses: actions/checkout@v3 + + - name: Set up Python 3.10 + if: ${{ github.event.repository.private == false }} + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install Nox + run: | + python3 -m pip install 'nox==<{ nox_version }>' + + - name: Get coverage reports + id: get-coverage-reports + uses: actions/download-artifact@v3 + with: + name: all-testrun-coverage-artifacts + path: artifacts/coverage/ + + - name: Display structure of downloaded files + run: tree -a artifacts/ + + - name: Combine Code Coverage + run: | + nox --force-color -e combine-coverage + + - name: Create Code Coverage HTML Report + run: | + nox --force-color -e create-html-coverage-report + + - name: Upload Code Coverage HTML Report + uses: actions/upload-artifact@v3 + with: + name: code-coverage-html-report + path: artifacts/coverage/html + retention-days: 7 + if-no-files-found: error + <%- endblock jobs %> diff --git a/.github/workflows/templates/test-pkg-repo-downloads.yml.jinja b/.github/workflows/templates/test-pkg-repo-downloads.yml.jinja index 709219e0f42f..f1ab65e5d27a 100644 --- a/.github/workflows/templates/test-pkg-repo-downloads.yml.jinja +++ b/.github/workflows/templates/test-pkg-repo-downloads.yml.jinja @@ -55,6 +55,7 @@ cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: <{ gh_environment }> + nox-version: <{ nox_version }> skip-code-coverage: true latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: <{ pkg_type.lower() }> @@ -92,6 +93,7 @@ salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: <{ gh_environment }> skip-code-coverage: true + nox-version: <{ nox_version }> latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" pkg-type: <{ pkg_type.lower() }> secrets: inherit @@ -128,6 +130,7 @@ salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" environment: <{ gh_environment }> skip-code-coverage: true + nox-version: <{ nox_version }> latest-release: "${{ needs.prepare-workflow.outputs.latest-release }}" secrets: inherit <%- endfor %> diff --git a/.github/workflows/templates/test-salt-pkg.yml.jinja b/.github/workflows/templates/test-salt-pkg.yml.jinja index bc0cd8afaf79..59346505efc4 100644 --- a/.github/workflows/templates/test-salt-pkg.yml.jinja +++ b/.github/workflows/templates/test-salt-pkg.yml.jinja @@ -50,6 +50,7 @@ arch: <{ arch }> salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: <{ pkg_type }> + nox-version: <{ nox_version }> cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> skip-code-coverage: <{ skip_test_coverage_check }> skip-junit-reports: <{ skip_junit_reports_check }> @@ -76,6 +77,7 @@ arch: <{ arch }> salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: macos + nox-version: <{ nox_version }> cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> skip-code-coverage: <{ skip_test_coverage_check }> skip-junit-reports: <{ skip_junit_reports_check }> @@ -104,6 +106,7 @@ arch: <{ arch }> salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" pkg-type: <{ pkg_type }> + nox-version: <{ nox_version }> cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> skip-code-coverage: <{ skip_test_coverage_check }> skip-junit-reports: <{ skip_junit_reports_check }> diff --git a/.github/workflows/templates/test-salt.yml.jinja b/.github/workflows/templates/test-salt.yml.jinja index d54ab8181ee5..323b5142af76 100644 --- a/.github/workflows/templates/test-salt.yml.jinja +++ b/.github/workflows/templates/test-salt.yml.jinja @@ -16,6 +16,7 @@ nox-session: ci-test-onedir platform: windows arch: amd64 + nox-version: <{ nox_version }> testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> @@ -39,6 +40,7 @@ nox-session: ci-test-onedir platform: darwin arch: x86_64 + nox-version: <{ nox_version }> testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> @@ -80,6 +82,7 @@ nox-session: ci-test-onedir platform: linux arch: <{ arch }> + nox-version: <{ nox_version }> testrun: ${{ needs.prepare-workflow.outputs.testrun }} salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}" cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }> diff --git a/.github/workflows/test-action-macos.yml b/.github/workflows/test-action-macos.yml index d8b3df5cc033..18f413ca8743 100644 --- a/.github/workflows/test-action-macos.yml +++ b/.github/workflows/test-action-macos.yml @@ -37,6 +37,10 @@ on: required: true type: string description: The platform arch being tested + nox-version: + required: true + type: string + description: The nox version to install package-name: required: false type: string @@ -55,7 +59,6 @@ on: env: - NOX_VERSION: "2022.8.7" COLUMNS: 190 PIP_INDEX_URL: "https://pypi-proxy.saltstack.net/root/local/+simple/" PIP_EXTRA_INDEX_URL: "https://pypi.org/simple" @@ -139,7 +142,7 @@ jobs: - name: Install Nox if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Define Nox Session id: define-nox-session @@ -232,7 +235,7 @@ jobs: - name: Install Nox run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Decompress .nox Directory run: | @@ -276,6 +279,7 @@ jobs: GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} run: | sudo -E nox -e ${{ env.NOX_SESSION }} -- ${{ matrix.tests-chunk }} -- \ -k "mac or darwin" --suppress-no-test-exit-code \ @@ -293,6 +297,7 @@ jobs: GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} run: | sudo -E nox -e ${{ env.NOX_SESSION }} -- ${{ matrix.tests-chunk }} -- \ -k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --slow-tests \ @@ -310,6 +315,7 @@ jobs: GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} run: | sudo -E nox -e ${{ env.NOX_SESSION }} -- ${{ matrix.tests-chunk }} -- \ -k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests \ @@ -327,6 +333,7 @@ jobs: GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} run: | sudo -E nox -e ${{ env.NOX_SESSION }} -- ${{ matrix.tests-chunk }} -- \ -k "mac or darwin" --suppress-no-test-exit-code @@ -343,6 +350,7 @@ jobs: GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} run: | sudo -E nox -e ${{ env.NOX_SESSION }} -- ${{ matrix.tests-chunk }} -- \ -k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --slow-tests @@ -359,6 +367,7 @@ jobs: GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} run: | sudo -E nox -e ${{ env.NOX_SESSION }} -- ${{ matrix.tests-chunk }} -- \ -k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests @@ -375,6 +384,7 @@ jobs: GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} run: | sudo -E nox -e ${{ env.NOX_SESSION }} -- ${{ matrix.tests-chunk }} -- \ -k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --flaky-jail @@ -391,6 +401,7 @@ jobs: GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} run: | sudo -E nox -e ${{ env.NOX_SESSION }} -- ${{ matrix.tests-chunk }} -- \ --slow-tests --core-tests -k "mac or darwin" @@ -425,6 +436,14 @@ jobs: path: | artifacts/coverage/ + - name: Upload All Code Coverage Test Run Artifacts + if: always() && inputs.skip-code-coverage == false && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled' + uses: actions/upload-artifact@v3 + with: + name: all-testrun-coverage-artifacts + path: | + artifacts/coverage/ + - name: Upload JUnit XML Test Run Artifacts if: always() && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled' uses: actions/upload-artifact@v3 @@ -492,7 +511,7 @@ jobs: - name: Install Nox run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Combine Code Coverage if: ${{ inputs.skip-code-coverage == false }} diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index d3de4b9258ea..31945d0a8a44 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -32,6 +32,10 @@ on: required: true type: string description: The platform arch being tested + nox-version: + required: true + type: string + description: The nox version to install package-name: required: false type: string @@ -50,7 +54,6 @@ on: env: - NOX_VERSION: "2022.8.7" COLUMNS: 190 AWS_MAX_ATTEMPTS: "10" AWS_RETRY_MODE: "adaptive" @@ -397,6 +400,14 @@ jobs: path: | artifacts/coverage/ + - name: Upload All Code Coverage Test Run Artifacts + if: always() && inputs.skip-code-coverage == false && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled' + uses: actions/upload-artifact@v3 + with: + name: all-testrun-coverage-artifacts + path: | + artifacts/coverage/ + - name: Upload JUnit XML Test Run Artifacts if: always() && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled' uses: actions/upload-artifact@v3 @@ -462,7 +473,7 @@ jobs: - name: Install Nox run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Combine Code Coverage if: ${{ inputs.skip-code-coverage == false }} diff --git a/.github/workflows/test-package-downloads-action-linux.yml b/.github/workflows/test-package-downloads-action-linux.yml index 0481c1c05940..d303aa115df4 100644 --- a/.github/workflows/test-package-downloads-action-linux.yml +++ b/.github/workflows/test-package-downloads-action-linux.yml @@ -35,6 +35,10 @@ on: required: true type: string description: The type of artifact to download + nox-version: + required: true + type: string + description: The nox version to install package-name: required: false type: string @@ -53,7 +57,6 @@ on: env: - NOX_VERSION: "2022.8.7" COLUMNS: 160 AWS_MAX_ATTEMPTS: "10" AWS_RETRY_MODE: "adaptive" @@ -313,7 +316,7 @@ jobs: - name: Install Nox run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Publish Test Report uses: mikepenz/action-junit-report@v3 diff --git a/.github/workflows/test-package-downloads-action-macos.yml b/.github/workflows/test-package-downloads-action-macos.yml index 862e1c5adf55..126aa89c0826 100644 --- a/.github/workflows/test-package-downloads-action-macos.yml +++ b/.github/workflows/test-package-downloads-action-macos.yml @@ -35,6 +35,10 @@ on: required: true type: string description: The type of artifact to download + nox-version: + required: true + type: string + description: The nox version to install python-version: required: false type: string @@ -58,7 +62,6 @@ on: env: - NOX_VERSION: "2022.8.7" COLUMNS: 160 AWS_MAX_ATTEMPTS: "10" AWS_RETRY_MODE: "adaptive" @@ -111,7 +114,7 @@ jobs: - name: Install Nox if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Install Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' @@ -178,7 +181,7 @@ jobs: - name: Install Nox run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3 @@ -217,6 +220,7 @@ jobs: GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" SKIP_CODE_COVERAGE: "${{ inputs.skip-code-coverage && '1' || '0' }}" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} SALT_RELEASE: "${{ inputs.salt-version }}" SALT_REPO_ARCH: ${{ inputs.arch }} LATEST_SALT_RELEASE: "${{ inputs.latest-release }}" @@ -288,7 +292,7 @@ jobs: - name: Install Nox run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Publish Test Report uses: mikepenz/action-junit-report@v3 diff --git a/.github/workflows/test-package-downloads-action-windows.yml b/.github/workflows/test-package-downloads-action-windows.yml index 29ed67fe8278..2f9e77fb1568 100644 --- a/.github/workflows/test-package-downloads-action-windows.yml +++ b/.github/workflows/test-package-downloads-action-windows.yml @@ -35,6 +35,10 @@ on: required: true type: string description: The latest salt release + nox-version: + required: true + type: string + description: The nox version to install package-name: required: false type: string @@ -58,7 +62,6 @@ on: env: - NOX_VERSION: "2022.8.7" COLUMNS: 160 AWS_MAX_ATTEMPTS: "10" AWS_RETRY_MODE: "adaptive" @@ -318,7 +321,7 @@ jobs: - name: Install Nox run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Publish Test Report uses: mikepenz/action-junit-report@v3 diff --git a/.github/workflows/test-packages-action-macos.yml b/.github/workflows/test-packages-action-macos.yml index 757baec178dc..f9b0fce96dc1 100644 --- a/.github/workflows/test-packages-action-macos.yml +++ b/.github/workflows/test-packages-action-macos.yml @@ -31,6 +31,10 @@ on: required: true type: string description: A JSON list of releases to test upgrades against + nox-version: + required: true + type: string + description: The nox version to install python-version: required: false type: string @@ -59,7 +63,6 @@ on: env: - NOX_VERSION: "2022.8.7" COLUMNS: 160 AWS_MAX_ATTEMPTS: "10" AWS_RETRY_MODE: "adaptive" @@ -131,7 +134,7 @@ jobs: - name: Install Nox if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Install Dependencies if: steps.nox-dependencies-cache.outputs.cache-hit != 'true' @@ -211,7 +214,7 @@ jobs: - name: Install Nox run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Download cached nox.${{ inputs.distro-slug }}.tar.* for session ${{ inputs.nox-session }} uses: actions/cache@v3 @@ -246,6 +249,7 @@ jobs: RERUN_FAILURES: "1" GITHUB_ACTIONS_PIPELINE: "1" SKIP_INITIAL_GH_ACTIONS_FAILURES: "1" + COVERAGE_CONTEXT: ${{ inputs.distro-slug }} run: | sudo -E nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.test-chunk }} \ ${{ contains(matrix.test-chunk, 'upgrade') && format('--prev-version {0}', matrix.version) || ''}} @@ -308,7 +312,7 @@ jobs: - name: Install Nox run: | - python3 -m pip install 'nox==${{ env.NOX_VERSION }}' + python3 -m pip install 'nox==${{ inputs.nox-version }}' - name: Publish Test Report uses: mikepenz/action-junit-report@v3 diff --git a/.github/workflows/test-packages-action.yml b/.github/workflows/test-packages-action.yml index 3e31045c6f75..59040dd7588a 100644 --- a/.github/workflows/test-packages-action.yml +++ b/.github/workflows/test-packages-action.yml @@ -31,6 +31,10 @@ on: required: true type: string description: A JSON list of releases to test upgrades against + nox-version: + required: true + type: string + description: The nox version to install package-name: required: false type: string @@ -54,7 +58,6 @@ on: env: - NOX_VERSION: "2022.8.7" COLUMNS: 160 AWS_MAX_ATTEMPTS: "10" AWS_RETRY_MODE: "adaptive" diff --git a/changelog/64957.fixed.md b/changelog/64957.fixed.md new file mode 100644 index 000000000000..5a5522efa8e5 --- /dev/null +++ b/changelog/64957.fixed.md @@ -0,0 +1,3 @@ +Fixed uninstaller to not remove the `salt` directory by default. This allows +the `extras-3.##` folder to persist so salt-pip dependencies are not wiped out +during an upgrade. diff --git a/cicd/shared-gh-workflows-context.yml b/cicd/shared-gh-workflows-context.yml index 44a645e4e219..0e3746bd5d76 100644 --- a/cicd/shared-gh-workflows-context.yml +++ b/cicd/shared-gh-workflows-context.yml @@ -1,2 +1,3 @@ +nox_version: "2022.8.7" python_version: "3.10.12" relenv_version: "0.13.4" diff --git a/noxfile.py b/noxfile.py index b3dbbfbfe7cd..2016302c0fdb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -456,6 +456,26 @@ def _run_with_coverage(session, *test_cmd, env=None): "--include=salt/*", env=coverage_base_env, ) + # Generate html report for tests code coverage + session.run( + "coverage", + "html", + "-d", + str(COVERAGE_OUTPUT_DIR.joinpath("html").relative_to(REPO_ROOT)), + "--omit=salt/*", + "--include=tests/*", + env=coverage_base_env, + ) + # Generate html report for salt code coverage + session.run( + "coverage", + "html", + "-d", + str(COVERAGE_OUTPUT_DIR.joinpath("html").relative_to(REPO_ROOT)), + "--omit=tests/*", + "--include=salt/*", + env=coverage_base_env, + ) def _report_coverage(session): @@ -1033,12 +1053,16 @@ def _pytest(session, coverage, cmd_args, env=None): return if coverage is True: + _coverage_cmd_args = [] + if "COVERAGE_CONTEXT" in os.environ: + _coverage_cmd_args.append(f"--context={os.environ['COVERAGE_CONTEXT']}") _run_with_coverage( session, "python", "-m", "coverage", "run", + *_coverage_cmd_args, "-m", "pytest", *args, @@ -1325,6 +1349,27 @@ def combine_coverage(session): pass +@nox.session(python="3", name="create-html-coverage-report") +def create_html_coverage_report(session): + _install_coverage_requirement(session) + env = { + # The full path to the .coverage data file. Makes sure we always write + # them to the same directory + "COVERAGE_FILE": str(COVERAGE_FILE), + } + + # Generate html report for Salt and tests combined code coverage + session.run( + "coverage", + "html", + "-d", + str(COVERAGE_OUTPUT_DIR.joinpath("html").relative_to(REPO_ROOT)), + "--include=salt/*,tests/*", + "--show-contexts", + env=env, + ) + + class Tee: """ Python class to mimic linux tee behaviour diff --git a/pkg/windows/build.ps1 b/pkg/windows/build.ps1 index ac273a6c163d..ecd188327869 100644 --- a/pkg/windows/build.ps1 +++ b/pkg/windows/build.ps1 @@ -39,11 +39,14 @@ param( [Parameter(Mandatory=$false)] [ValidatePattern("^\d{1,2}.\d{1,2}.\d{1,2}$")] [Alias("p")] - [String] $PythonVersion = "3.10.12", + # The version of Python to build/fetch. This is tied to the version of + # Relenv + [String] $PythonVersion, [Parameter(Mandatory=$false)] [Alias("r")] - [String] $RelenvVersion = "0.12.3", + # The version of Relenv to install + [String] $RelenvVersion, [Parameter(Mandatory=$false)] [Alias("b")] @@ -57,7 +60,7 @@ param( [Switch] $CICD, [Parameter(Mandatory=$false)] - # Don't install. It should already be installed + # Don't install/build python. It should already be installed [Switch] $SkipInstall ) @@ -98,6 +101,33 @@ if ( [String]::IsNullOrEmpty($Version) ) { } } +#------------------------------------------------------------------------------- +# Verify Python and Relenv Versions +#------------------------------------------------------------------------------- + +$yaml = Get-Content -Path "$PROJECT_DIR\cicd\shared-gh-workflows-context.yml" +$dict_versions = @{} +$yaml | ForEach-Object { + $val1, $val2 = $_ -split ": " + $dict_versions[$val1] = $val2.Trim("""") +} + +if ( [String]::IsNullOrEmpty($PythonVersion) ) { + $PythonVersion = $dict_versions["python_version"] + if ( [String]::IsNullOrEmpty($PythonVersion) ) { + Write-Host "Failed to load Python Version" + exit 1 + } +} + +if ( [String]::IsNullOrEmpty($RelenvVersion) ) { + $RelenvVersion = $dict_versions["relenv_version"] + if ( [String]::IsNullOrEmpty($RelenvVersion) ) { + Write-Host "Failed to load Relenv Version" + exit 1 + } +} + #------------------------------------------------------------------------------- # Start the Script #------------------------------------------------------------------------------- diff --git a/pkg/windows/build_python.ps1 b/pkg/windows/build_python.ps1 index 90a2b053a924..28aee58fbd2a 100644 --- a/pkg/windows/build_python.ps1 +++ b/pkg/windows/build_python.ps1 @@ -18,11 +18,14 @@ param( [Parameter(Mandatory=$false)] [ValidatePattern("^\d{1,2}.\d{1,2}.\d{1,2}$")] [Alias("v")] - [String] $Version = "3.10.12", + # The version of python to build/fetch. This is tied to the version of + # Relenv + [String] $Version, [Parameter(Mandatory=$false)] [Alias("r")] - [String] $RelenvVersion = "0.12.3", + # The version of Relenv to install + [String] $RelenvVersion, [Parameter(Mandatory=$false)] [ValidateSet("x64", "x86", "amd64")] @@ -68,6 +71,33 @@ function Write-Result($result, $ForegroundColor="Green") { Write-Host -ForegroundColor $ForegroundColor ("{0,$position}$result" -f "") }} +#------------------------------------------------------------------------------- +# Verify Python and Relenv Versions +#------------------------------------------------------------------------------- + +$yaml = Get-Content -Path "$PROJECT_DIR\cicd\shared-gh-workflows-context.yml" +$dict_versions = @{} +$yaml | ForEach-Object { + $val1, $val2 = $_ -split ": " + $dict_versions[$val1] = $val2.Trim("""") +} + +if ( [String]::IsNullOrEmpty($Version) ) { + $Version = $dict_versions["python_version"] + if ( [String]::IsNullOrEmpty($Version) ) { + Write-Host "Failed to load Python Version" + exit 1 + } +} + +if ( [String]::IsNullOrEmpty($RelenvVersion) ) { + $RelenvVersion = $dict_versions["relenv_version"] + if ( [String]::IsNullOrEmpty($RelenvVersion) ) { + Write-Host "Failed to load Relenv Version" + exit 1 + } +} + #------------------------------------------------------------------------------- # Start the Script #------------------------------------------------------------------------------- @@ -145,7 +175,6 @@ if ( $env:VIRTUAL_ENV ) { #------------------------------------------------------------------------------- $SCRIPT_DIR = (Get-ChildItem "$($myInvocation.MyCommand.Definition)").DirectoryName $BUILD_DIR = "$SCRIPT_DIR\buildenv" -$SCRIPTS_DIR = "$BUILD_DIR\Scripts" $RELENV_DIR = "${env:LOCALAPPDATA}\relenv" $SYS_PY_BIN = (python -c "import sys; print(sys.executable)") $BLD_PY_BIN = "$BUILD_DIR\Scripts\python.exe" @@ -238,16 +267,16 @@ $env:RELENV_FETCH_VERSION=$RelenvVersion #------------------------------------------------------------------------------- if ( $Build ) { Write-Host "Building Python with Relenv (long-running): " -NoNewLine - $output = relenv build --clean --arch $ARCH + $output = relenv build --clean --python $Version --arch $ARCH } else { Write-Host "Fetching Python with Relenv: " -NoNewLine relenv fetch --python $Version --arch $ARCH | Out-Null -} -if ( Test-Path -Path "$RELENV_DIR\build\$Version-$ARCH-win.tar.xz") { - Write-Result "Success" -ForegroundColor Green -} else { - Write-Result "Failed" -ForegroundColor Red - exit 1 + if ( Test-Path -Path "$RELENV_DIR\build\$Version-$ARCH-win.tar.xz") { + Write-Result "Success" -ForegroundColor Green + } else { + Write-Result "Failed" -ForegroundColor Red + exit 1 + } } #------------------------------------------------------------------------------- diff --git a/pkg/windows/nsis/installer/Salt-Minion-Setup.nsi b/pkg/windows/nsis/installer/Salt-Minion-Setup.nsi index 2377a2194677..2a957056f514 100644 --- a/pkg/windows/nsis/installer/Salt-Minion-Setup.nsi +++ b/pkg/windows/nsis/installer/Salt-Minion-Setup.nsi @@ -1109,9 +1109,10 @@ Function ${un}uninstallSalt ${EndIf} # Remove files - Delete "$INSTDIR\uninst.exe" - Delete "$INSTDIR\ssm.exe" + Delete "$INSTDIR\multi-minion*" Delete "$INSTDIR\salt*" + Delete "$INSTDIR\ssm.exe" + Delete "$INSTDIR\uninst.exe" Delete "$INSTDIR\vcredist.exe" RMDir /r "$INSTDIR\DLLs" RMDir /r "$INSTDIR\Include" @@ -1189,6 +1190,20 @@ Function ${un}uninstallSalt ${Else} + # Prompt for the removal of the Installation Directory which contains + # the extras directory and the Root Directory which contains the config + # and pki directories. These directories will not be removed during + # an upgrade. + ${IfNot} $DeleteRootDir == 1 + MessageBox MB_YESNO|MB_DEFBUTTON2|MB_USERICON \ + "Would you like to completely remove the entire Salt \ + Installation? This includes the following:$\n\ + - Extra Pip Packages ($INSTDIR\extras-3.##)$\n\ + - Minion Config ($RootDir\conf)$\n\ + - Minion PKIs ($RootDir\conf\pki)"\ + /SD IDNO IDNO finished + ${EndIf} + # New Method Installation # This makes the $APPDATA variable point to the ProgramData folder instead # of the current user's roaming AppData folder @@ -1214,8 +1229,8 @@ Function ${un}uninstallSalt # Only delete Salt Project directory if it's in Program Files # Otherwise, we can't guess where the user may have installed salt ${GetParent} $INSTDIR $0 # Get parent directory (Salt Project) - ${If} $0 == "$ProgramFiles\Salt Project" # Make sure it's not ProgramFiles - ${OrIf} $0 == "$ProgramFiles64\Salt Project" # Make sure it's not Program Files (x86) + ${If} $0 == "$ProgramFiles\Salt Project" # Make sure it's ProgramFiles + ${OrIf} $0 == "$ProgramFiles64\Salt Project" # Make sure it's Program Files (x86) SetOutPath "$SysDrive" # Can't remove CWD RMDir /r $0 ${EndIf} @@ -1228,15 +1243,6 @@ Function ${un}uninstallSalt # Expand any environment variables ExpandEnvStrings $RootDir $RootDir - # Prompt for the removal of the Root Directory which contains the config - # and pki directories - ${IfNot} $DeleteRootDir == 1 - MessageBox MB_YESNO|MB_DEFBUTTON2|MB_USERICON \ - "Would you like to completely remove the Root Directory \ - ($RootDir) and all of its contents?" \ - /SD IDNO IDNO finished - ${EndIf} - # Remove the Salt Project directory in ProgramData # The Salt Project directory will only ever be in ProgramData # It is not user selectable @@ -1837,8 +1843,8 @@ Function un.parseUninstallerCommandLineSwitches $\n$\t$\tare the same (C:\salt)\ $\n\ $\n/delete-root-dir$\tDelete the root directory that contains the config\ - $\n$\t$\tand pki directories. Default is to not delete the root\ - $\n$\t$\tdirectory\ + $\n$\t$\tand pki directories. Also removes the installation directory\ + $\n$\t$\tincluding the extras directory. Default is to not delete\ $\n\ $\n$\t$\tThis applies to new method installations where the\ $\n$\t$\troot directory is in ProgramData and the installation\ diff --git a/tools/release.py b/tools/release.py index 5764bd84f5bd..f78e93c07ecf 100644 --- a/tools/release.py +++ b/tools/release.py @@ -16,6 +16,7 @@ from ptscripts import Context, command_group import tools.utils +import tools.utils.repo try: import boto3 @@ -111,7 +112,7 @@ def upload_artifacts(ctx: Context, salt_version: str, artifacts_path: pathlib.Pa str(fpath), tools.utils.STAGING_BUCKET_NAME, upload_path, - Callback=tools.utils.UpdateProgress(progress, task), + Callback=tools.utils.repo.UpdateProgress(progress, task), ) except KeyboardInterrupt: pass @@ -180,7 +181,7 @@ def download_onedir_artifact( Bucket=tools.utils.STAGING_BUCKET_NAME, Key=remote_path, Fileobj=wfh, - Callback=tools.utils.UpdateProgress(progress, task), + Callback=tools.utils.repo.UpdateProgress(progress, task), ) except ClientError as exc: if "Error" not in exc.response: diff --git a/tools/vm.py b/tools/vm.py index 92d374285909..f35102ad01b2 100644 --- a/tools/vm.py +++ b/tools/vm.py @@ -311,6 +311,7 @@ def test( "PRINT_TEST_PLAN_ONLY": "0", "SKIP_INITIAL_ONEDIR_FAILURES": "1", "SKIP_INITIAL_GH_ACTIONS_FAILURES": "1", + "COVERAGE_CONTEXT": name, } if "LANG" in os.environ: env["LANG"] = os.environ["LANG"]