mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Show sys info fix
This commit is contained in:
parent
a9a47fa2da
commit
454cb18435
13 changed files with 314 additions and 1406 deletions
75
.github/workflows/ci.yml
vendored
75
.github/workflows/ci.yml
vendored
|
@ -668,48 +668,6 @@ jobs:
|
|||
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016-nsis-pkg-tests:
|
||||
name: Windows 2016 NSIS Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'windows-2016') }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-pkgs-onedir-windows
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-packages-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
pkg-type: NSIS
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016-msi-pkg-tests:
|
||||
name: Windows 2016 MSI Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'windows-2016') }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-pkgs-onedir-windows
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-packages-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
pkg-type: MSI
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2019-nsis-pkg-tests:
|
||||
name: Windows 2019 NSIS Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'windows-2019') }}
|
||||
|
@ -794,34 +752,13 @@ jobs:
|
|||
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016:
|
||||
name: Windows 2016 Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
nox-version: 2022.8.7
|
||||
gh-actions-python-version: "3.10"
|
||||
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
|
||||
workflow-slug: ci
|
||||
default-timeout: 180
|
||||
|
||||
windows-2019:
|
||||
name: Windows 2019 Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2019
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -842,7 +779,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2022
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -885,7 +822,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-linux
|
||||
uses: ./.github/workflows/test-action-linux-gh.yml
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -906,7 +843,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-linux
|
||||
uses: ./.github/workflows/test-action-linux-gh.yml
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04-arm64
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -932,7 +869,6 @@ jobs:
|
|||
- build-ci-deps-linux
|
||||
- build-ci-deps-macos
|
||||
- build-ci-deps-windows
|
||||
- windows-2016
|
||||
- windows-2019
|
||||
- windows-2022
|
||||
- macos-12
|
||||
|
@ -1080,7 +1016,6 @@ jobs:
|
|||
- build-ci-deps-linux
|
||||
- build-ci-deps-macos
|
||||
- build-ci-deps-windows
|
||||
- windows-2016
|
||||
- windows-2019
|
||||
- windows-2022
|
||||
- macos-12
|
||||
|
@ -1089,8 +1024,6 @@ jobs:
|
|||
- ubuntu-2204-pkg-tests
|
||||
- ubuntu-2204-arm64-pkg-tests
|
||||
- macos-12-pkg-tests
|
||||
- windows-2016-nsis-pkg-tests
|
||||
- windows-2016-msi-pkg-tests
|
||||
- windows-2019-nsis-pkg-tests
|
||||
- windows-2019-msi-pkg-tests
|
||||
- windows-2022-nsis-pkg-tests
|
||||
|
|
74
.github/workflows/nightly.yml
vendored
74
.github/workflows/nightly.yml
vendored
|
@ -791,48 +791,6 @@ jobs:
|
|||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016-nsis-pkg-tests:
|
||||
name: Windows 2016 NSIS Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-pkgs-onedir-windows
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-packages-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
pkg-type: NSIS
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016-msi-pkg-tests:
|
||||
name: Windows 2016 MSI Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-pkgs-onedir-windows
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-packages-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
pkg-type: MSI
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2019-nsis-pkg-tests:
|
||||
name: Windows 2019 NSIS Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
|
@ -917,34 +875,13 @@ jobs:
|
|||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016:
|
||||
name: Windows 2016 Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
nox-version: 2022.8.7
|
||||
gh-actions-python-version: "3.10"
|
||||
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: true
|
||||
workflow-slug: nightly
|
||||
default-timeout: 360
|
||||
|
||||
windows-2019:
|
||||
name: Windows 2019 Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2019
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -965,7 +902,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2022
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -1008,7 +945,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-linux
|
||||
uses: ./.github/workflows/test-action-linux-gh.yml
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -1029,7 +966,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-linux
|
||||
uses: ./.github/workflows/test-action-linux-gh.yml
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04-arm64
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -1792,7 +1729,6 @@ jobs:
|
|||
- build-ci-deps-linux
|
||||
- build-ci-deps-macos
|
||||
- build-ci-deps-windows
|
||||
- windows-2016
|
||||
- windows-2019
|
||||
- windows-2022
|
||||
- macos-12
|
||||
|
@ -1865,8 +1801,6 @@ jobs:
|
|||
- ubuntu-2204-pkg-tests
|
||||
- ubuntu-2204-arm64-pkg-tests
|
||||
- macos-12-pkg-tests
|
||||
- windows-2016-nsis-pkg-tests
|
||||
- windows-2016-msi-pkg-tests
|
||||
- windows-2019-nsis-pkg-tests
|
||||
- windows-2019-msi-pkg-tests
|
||||
- windows-2022-nsis-pkg-tests
|
||||
|
|
74
.github/workflows/scheduled.yml
vendored
74
.github/workflows/scheduled.yml
vendored
|
@ -707,48 +707,6 @@ jobs:
|
|||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016-nsis-pkg-tests:
|
||||
name: Windows 2016 NSIS Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-pkgs-onedir-windows
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-packages-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
pkg-type: NSIS
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016-msi-pkg-tests:
|
||||
name: Windows 2016 MSI Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-pkgs-onedir-windows
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-packages-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
pkg-type: MSI
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2019-nsis-pkg-tests:
|
||||
name: Windows 2019 NSIS Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
|
@ -833,34 +791,13 @@ jobs:
|
|||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016:
|
||||
name: Windows 2016 Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
nox-version: 2022.8.7
|
||||
gh-actions-python-version: "3.10"
|
||||
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: true
|
||||
workflow-slug: scheduled
|
||||
default-timeout: 360
|
||||
|
||||
windows-2019:
|
||||
name: Windows 2019 Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2019
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -881,7 +818,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2022
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -924,7 +861,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-linux
|
||||
uses: ./.github/workflows/test-action-linux-gh.yml
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -945,7 +882,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-linux
|
||||
uses: ./.github/workflows/test-action-linux-gh.yml
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04-arm64
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -983,7 +920,6 @@ jobs:
|
|||
- build-ci-deps-linux
|
||||
- build-ci-deps-macos
|
||||
- build-ci-deps-windows
|
||||
- windows-2016
|
||||
- windows-2019
|
||||
- windows-2022
|
||||
- macos-12
|
||||
|
@ -992,8 +928,6 @@ jobs:
|
|||
- ubuntu-2204-pkg-tests
|
||||
- ubuntu-2204-arm64-pkg-tests
|
||||
- macos-12-pkg-tests
|
||||
- windows-2016-nsis-pkg-tests
|
||||
- windows-2016-msi-pkg-tests
|
||||
- windows-2019-nsis-pkg-tests
|
||||
- windows-2019-msi-pkg-tests
|
||||
- windows-2022-nsis-pkg-tests
|
||||
|
|
74
.github/workflows/staging.yml
vendored
74
.github/workflows/staging.yml
vendored
|
@ -773,48 +773,6 @@ jobs:
|
|||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016-nsis-pkg-tests:
|
||||
name: Windows 2016 NSIS Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-pkgs-onedir-windows
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-packages-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
pkg-type: NSIS
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016-msi-pkg-tests:
|
||||
name: Windows 2016 MSI Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-pkgs-onedir-windows
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-packages-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
pkg-type: MSI
|
||||
nox-version: 2022.8.7
|
||||
python-version: "3.10"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2019-nsis-pkg-tests:
|
||||
name: Windows 2019 NSIS Package Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test-pkg'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
|
@ -899,34 +857,13 @@ jobs:
|
|||
skip-code-coverage: true
|
||||
testing-releases: ${{ needs.prepare-workflow.outputs.testing-releases }}
|
||||
|
||||
windows-2016:
|
||||
name: Windows 2016 Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
with:
|
||||
distro-slug: windows-2016
|
||||
nox-session: ci-test-onedir
|
||||
platform: windows
|
||||
arch: amd64
|
||||
nox-version: 2022.8.7
|
||||
gh-actions-python-version: "3.10"
|
||||
testrun: ${{ needs.prepare-workflow.outputs.testrun }}
|
||||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|3.10.15
|
||||
skip-code-coverage: true
|
||||
workflow-slug: staging
|
||||
default-timeout: 180
|
||||
|
||||
windows-2019:
|
||||
name: Windows 2019 Test
|
||||
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2019
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -947,7 +884,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: windows-2022
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -990,7 +927,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-linux
|
||||
uses: ./.github/workflows/test-action-linux-gh.yml
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -1011,7 +948,7 @@ jobs:
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-linux
|
||||
uses: ./.github/workflows/test-action-linux-gh.yml
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: ubuntu-22.04-arm64
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -1904,7 +1841,6 @@ jobs:
|
|||
- build-ci-deps-linux
|
||||
- build-ci-deps-macos
|
||||
- build-ci-deps-windows
|
||||
- windows-2016
|
||||
- windows-2019
|
||||
- windows-2022
|
||||
- macos-12
|
||||
|
@ -1913,8 +1849,6 @@ jobs:
|
|||
- ubuntu-2204-pkg-tests
|
||||
- ubuntu-2204-arm64-pkg-tests
|
||||
- macos-12-pkg-tests
|
||||
- windows-2016-nsis-pkg-tests
|
||||
- windows-2016-msi-pkg-tests
|
||||
- windows-2019-nsis-pkg-tests
|
||||
- windows-2019-msi-pkg-tests
|
||||
- windows-2022-nsis-pkg-tests
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-windows
|
||||
uses: ./.github/workflows/test-action-windows-gh.yml
|
||||
uses: ./.github/workflows/test-action-windows.yml
|
||||
with:
|
||||
distro-slug: <{ os.slug }>
|
||||
nox-session: ci-test-onedir
|
||||
|
@ -80,7 +80,7 @@
|
|||
needs:
|
||||
- prepare-workflow
|
||||
- build-ci-deps-linux
|
||||
uses: ./.github/workflows/test-action-linux-gh.yml
|
||||
uses: ./.github/workflows/test-action-linux.yml
|
||||
with:
|
||||
distro-slug: <{ os.slug }>
|
||||
nox-session: ci-test-onedir
|
||||
|
|
467
.github/workflows/test-action-linux-gh.yml
vendored
467
.github/workflows/test-action-linux-gh.yml
vendored
|
@ -1,467 +0,0 @@
|
|||
---
|
||||
name: Test Artifact(macOS)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
distro-slug:
|
||||
required: true
|
||||
type: string
|
||||
description: The OS slug to run tests against
|
||||
nox-session:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox session to run
|
||||
testrun:
|
||||
required: true
|
||||
type: string
|
||||
description: JSON string containing information about what and how to run the test suite
|
||||
gh-actions-python-version:
|
||||
required: false
|
||||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.11"
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to running tests.
|
||||
cache-prefix:
|
||||
required: true
|
||||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform being tested
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform arch being tested
|
||||
fips:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
description: Test run with FIPS enabled
|
||||
nox-version:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox version to install
|
||||
package-name:
|
||||
required: false
|
||||
type: string
|
||||
description: The onedir package name to use
|
||||
default: salt
|
||||
skip-code-coverage:
|
||||
required: false
|
||||
type: boolean
|
||||
description: Skip code coverage
|
||||
default: false
|
||||
workflow-slug:
|
||||
required: false
|
||||
type: string
|
||||
description: Which workflow is running.
|
||||
default: ci
|
||||
default-timeout:
|
||||
required: false
|
||||
type: number
|
||||
description: Timeout, in minutes, for the test job(Default 360, 6 hours).
|
||||
default: 360
|
||||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }}
|
||||
PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }}
|
||||
PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }}
|
||||
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
||||
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
|
||||
|
||||
jobs:
|
||||
|
||||
generate-matrix:
|
||||
name: Test Matrix
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix-include: ${{ steps.generate-matrix.outputs.matrix }}
|
||||
build-reports: ${{ steps.generate-matrix.outputs.build-reports }}
|
||||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.10.14
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
with:
|
||||
cache-prefix: ${{ inputs.cache-prefix }}
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
- name: Generate Test Matrix
|
||||
id: generate-matrix
|
||||
run: |
|
||||
tools ci matrix --workflow=${{ inputs.workflow-slug }} ${{ inputs.distro-slug }}
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: linux-${{ inputs.arch }}
|
||||
container:
|
||||
image: ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-22.04
|
||||
# Full test runs. Each chunk should never take more than 2 hours.
|
||||
# Partial test runs(no chunk parallelization), 6 Hours
|
||||
timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }}
|
||||
needs:
|
||||
- generate-matrix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include) }}
|
||||
env:
|
||||
SALT_TRANSPORT: ${{ matrix.transport }}
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Check python
|
||||
run: |
|
||||
which python3
|
||||
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
- name: "Set `TIMESTAMP` environment variable"
|
||||
shell: bash
|
||||
run: |
|
||||
echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV"
|
||||
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Salt Version
|
||||
run: |
|
||||
echo "${{ inputs.salt-version }}" > salt/_version.txt
|
||||
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
path: artifacts/
|
||||
|
||||
- name: Decompress Onedir Tarball
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -c "import os; os.makedirs('artifacts', exist_ok=True)"
|
||||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: Install System Dependencies
|
||||
run: |
|
||||
echo true
|
||||
|
||||
- name: Download nox.linux.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: nox-linux-${{ inputs.arch }}-${{ inputs.nox-session }}
|
||||
|
||||
- name: Set up Python ${{ inputs.gh-actions-python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ inputs.gh-actions-python-version }}"
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
nox --force-color -e decompress-dependencies -- linux ${{ inputs.arch }}
|
||||
|
||||
- name: Download testrun-changed-files.txt
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: testrun-changed-files.txt
|
||||
|
||||
- name: Current Directory
|
||||
run: |
|
||||
pwd
|
||||
|
||||
- name: Show System Info
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_SYSTEM_INFO_ONLY: "1"
|
||||
run: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }}
|
||||
|
||||
- name: Run Changed Tests
|
||||
id: run-fast-changed-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --core-tests --slow-tests --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
- name: Run Fast Tests
|
||||
id: run-fast-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code
|
||||
|
||||
- name: Run Slow Tests
|
||||
id: run-slow-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --slow-tests
|
||||
|
||||
- name: Run Core Tests
|
||||
id: run-core-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests
|
||||
|
||||
- name: Run Flaky Tests
|
||||
id: run-flaky-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --flaky-jail
|
||||
|
||||
- name: Run Full Tests
|
||||
id: run-full-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
--slow-tests --core-tests -k "mac or darwin"
|
||||
|
||||
- name: Fix file ownership
|
||||
run: |
|
||||
sudo chown -R "$(id -un)" .
|
||||
|
||||
- name: Combine Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false
|
||||
run: |
|
||||
nox --force-color -e combine-coverage
|
||||
|
||||
- name: Prepare Test Run Artifacts
|
||||
id: download-artifacts-from-vm
|
||||
if: always()
|
||||
run: |
|
||||
# Delete the salt onedir, we won't need it anymore and it will prevent
|
||||
# from it showing in the tree command below
|
||||
rm -rf artifacts/salt*
|
||||
tree -a artifacts
|
||||
if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}
|
||||
fi
|
||||
|
||||
- name: Upload 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@v4
|
||||
with:
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/coverage/
|
||||
include-hidden-files: true
|
||||
|
||||
- name: Upload JUnit XML Test Run Artifacts
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/xml-unittests-output/
|
||||
include-hidden-files: true
|
||||
|
||||
- name: Upload Test Run Log Artifacts
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/logs
|
||||
include-hidden-files: true
|
||||
|
||||
report:
|
||||
name: Test Reports
|
||||
if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- test
|
||||
- generate-matrix
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
- name: Merge JUnit XML Test Run Artifacts
|
||||
if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
|
||||
separate-directories: false
|
||||
delete-merged: true
|
||||
|
||||
- name: Merge Log Test Run Artifacts
|
||||
if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
|
||||
separate-directories: false
|
||||
delete-merged: true
|
||||
|
||||
- name: Merge Code Coverage Test Run Artifacts
|
||||
if: ${{ inputs.skip-code-coverage == false }}
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
|
||||
separate-directories: false
|
||||
delete-merged: true
|
||||
|
||||
- name: Download Code Coverage Test Run Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
if: ${{ inputs.skip-code-coverage == false }}
|
||||
id: download-coverage-artifacts
|
||||
with:
|
||||
path: artifacts/coverage/
|
||||
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Show Downloaded Test Run Artifacts
|
||||
if: ${{ inputs.skip-code-coverage == false }}
|
||||
run: |
|
||||
tree -a artifacts
|
||||
|
||||
- name: Set up Python ${{ inputs.gh-actions-python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ inputs.gh-actions-python-version }}"
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
|
||||
- name: Create XML Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
nox --force-color -e create-xml-coverage-reports
|
||||
mv artifacts/coverage/salt.xml artifacts/coverage/salt..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
|
||||
- name: Report Salt Code Coverage
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage -- salt
|
||||
|
||||
- name: Report Combined Code Coverage
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage
|
||||
|
||||
- name: Rename Code Coverage DB
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}
|
||||
|
||||
- name: Upload Code Coverage DB
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: all-testrun-coverage-artifacts-${{ inputs.distro-slug }}.${{ inputs.nox-session }}
|
||||
path: artifacts/coverage
|
||||
include-hidden-files: true
|
242
.github/workflows/test-action-linux.yml
vendored
242
.github/workflows/test-action-linux.yml
vendored
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
name: Test Artifact
|
||||
name: Test Artifact(macOS)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
@ -16,6 +16,11 @@ on:
|
|||
required: true
|
||||
type: string
|
||||
description: JSON string containing information about what and how to run the test suite
|
||||
gh-actions-python-version:
|
||||
required: false
|
||||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.11"
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
|
@ -32,20 +37,15 @@ on:
|
|||
required: true
|
||||
type: string
|
||||
description: The platform arch being tested
|
||||
nox-version:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox version to install
|
||||
gh-actions-python-version:
|
||||
required: false
|
||||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.10"
|
||||
fips:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
description: Test run with FIPS enabled
|
||||
nox-version:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox version to install
|
||||
package-name:
|
||||
required: false
|
||||
type: string
|
||||
|
@ -69,8 +69,6 @@ on:
|
|||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
AWS_MAX_ATTEMPTS: "10"
|
||||
AWS_RETRY_MODE: "adaptive"
|
||||
PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }}
|
||||
PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }}
|
||||
PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }}
|
||||
|
@ -88,7 +86,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: 3.10.14
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
|
@ -108,14 +106,13 @@ jobs:
|
|||
- name: Generate Test Matrix
|
||||
id: generate-matrix
|
||||
run: |
|
||||
tools ci matrix --workflow=${{ inputs.workflow-slug }} ${{ fromJSON(inputs.testrun)['type'] == 'full' && '--full ' || '' }}${{ inputs.distro-slug }}
|
||||
tools ci matrix --workflow=${{ inputs.workflow-slug }} ${{ inputs.distro-slug }}
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- bastion
|
||||
runs-on: linux-${{ inputs.arch }}
|
||||
container:
|
||||
image: ghcr.io/saltstack/salt-ci-containers/testing:ubuntu-22.04
|
||||
# Full test runs. Each chunk should never take more than 2 hours.
|
||||
# Partial test runs(no chunk parallelization), 6 Hours
|
||||
timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }}
|
||||
|
@ -127,9 +124,16 @@ jobs:
|
|||
include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include) }}
|
||||
env:
|
||||
SALT_TRANSPORT: ${{ matrix.transport }}
|
||||
TEST_GROUP: ${{ matrix.test-group || 1 }}
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Check python
|
||||
run: |
|
||||
which python3
|
||||
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
|
@ -161,19 +165,29 @@ jobs:
|
|||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: Install System Dependencies
|
||||
run: |
|
||||
echo true
|
||||
|
||||
- name: Download nox.linux.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: nox-linux-${{ inputs.arch }}-${{ inputs.nox-session }}
|
||||
|
||||
- name: PyPi Proxy
|
||||
run: |
|
||||
sed -i '7s;^;--index-url=${{ vars.PIP_INDEX_URL }} --trusted-host ${{ vars.PIP_TRUSTED_HOST }} --extra-index-url=${{ vars.PIP_EXTRA_INDEX_URL }}\n;' requirements/static/ci/*/*.txt
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
- name: Set up Python ${{ inputs.gh-actions-python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
cache-prefix: ${{ inputs.cache-prefix }}
|
||||
python-version: "${{ inputs.gh-actions-python-version }}"
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
nox --force-color -e decompress-dependencies -- linux ${{ inputs.arch }}
|
||||
|
||||
- name: Download testrun-changed-files.txt
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
|
@ -181,115 +195,146 @@ jobs:
|
|||
with:
|
||||
name: testrun-changed-files.txt
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
- name: Current Directory
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Start VM
|
||||
id: spin-up-vm
|
||||
env:
|
||||
TESTS_CHUNK: ${{ matrix.tests-chunk }}
|
||||
run: |
|
||||
tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }}
|
||||
|
||||
- name: List Free Space
|
||||
run: |
|
||||
tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true
|
||||
|
||||
- name: Upload Checkout To VM
|
||||
run: |
|
||||
tools --timestamps vm rsync ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
tools --timestamps vm decompress-dependencies ${{ inputs.distro-slug }}
|
||||
pwd
|
||||
|
||||
- name: Show System Info
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_SYSTEM_INFO_ONLY: "1"
|
||||
run: |
|
||||
tools --timestamps --timeout-secs=1800 vm test --skip-requirements-install --print-system-information-only \
|
||||
--nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }}
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }}
|
||||
|
||||
- name: Run Changed Tests
|
||||
id: run-fast-changed-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --core-tests --slow-tests --suppress-no-test-exit-code \
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --core-tests --slow-tests --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
- name: Run Fast Tests
|
||||
id: run-fast-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \
|
||||
${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }}
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code
|
||||
|
||||
- name: Run Slow Tests
|
||||
id: run-slow-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --slow-tests
|
||||
|
||||
- name: Run Core Tests
|
||||
id: run-core-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests
|
||||
|
||||
- name: Run Flaky Tests
|
||||
id: run-flaky-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --flaky-jail
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --flaky-jail
|
||||
|
||||
- name: Run Full Tests
|
||||
id: run-full-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \
|
||||
-E TEST_GROUP ${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }} -- --slow-tests --core-tests \
|
||||
--test-group-count=${{ matrix.test-group-count || 1 }} --test-group=${{ matrix.test-group || 1 }}
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
--slow-tests --core-tests -k "mac or darwin"
|
||||
|
||||
- name: Fix file ownership
|
||||
run: |
|
||||
sudo chown -R "$(id -un)" .
|
||||
|
||||
- name: Combine Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false && steps.spin-up-vm.outcome == 'success'
|
||||
if: always() && inputs.skip-code-coverage == false
|
||||
run: |
|
||||
tools --timestamps vm combine-coverage ${{ inputs.distro-slug }}
|
||||
nox --force-color -e combine-coverage
|
||||
|
||||
- name: Download Test Run Artifacts
|
||||
- name: Prepare Test Run Artifacts
|
||||
id: download-artifacts-from-vm
|
||||
if: always() && steps.spin-up-vm.outcome == 'success'
|
||||
if: always()
|
||||
run: |
|
||||
tools --timestamps vm download-artifacts ${{ inputs.distro-slug }}
|
||||
# Delete the salt onedir, we won't need it anymore and it will prevent
|
||||
# from it showing in the tree command below
|
||||
rm -rf artifacts/salt*
|
||||
tree -a artifacts
|
||||
if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}${{ inputs.fips && '.fips' || '' }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}.grp${{ matrix.test-group || '1' }}
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}
|
||||
fi
|
||||
|
||||
- name: Destroy VM
|
||||
if: always()
|
||||
run: |
|
||||
tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} || true
|
||||
|
||||
- name: Upload 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@v4
|
||||
with:
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }}
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/coverage/
|
||||
include-hidden-files: true
|
||||
|
@ -298,7 +343,7 @@ jobs:
|
|||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }}
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/xml-unittests-output/
|
||||
include-hidden-files: true
|
||||
|
@ -307,7 +352,7 @@ jobs:
|
|||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }}
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/logs
|
||||
include-hidden-files: true
|
||||
|
@ -340,8 +385,8 @@ jobs:
|
|||
continue-on-error: true
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-*
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
|
||||
separate-directories: false
|
||||
delete-merged: true
|
||||
|
||||
|
@ -350,8 +395,8 @@ jobs:
|
|||
continue-on-error: true
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-log-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-*
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
|
||||
separate-directories: false
|
||||
delete-merged: true
|
||||
|
||||
|
@ -360,8 +405,8 @@ jobs:
|
|||
continue-on-error: true
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}-*
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
|
||||
separate-directories: false
|
||||
delete-merged: true
|
||||
|
||||
|
@ -371,7 +416,7 @@ jobs:
|
|||
id: download-coverage-artifacts
|
||||
with:
|
||||
path: artifacts/coverage/
|
||||
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}*
|
||||
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Show Downloaded Test Run Artifacts
|
||||
|
@ -379,6 +424,11 @@ jobs:
|
|||
run: |
|
||||
tree -a artifacts
|
||||
|
||||
- name: Set up Python ${{ inputs.gh-actions-python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ inputs.gh-actions-python-version }}"
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
|
@ -387,8 +437,8 @@ jobs:
|
|||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
nox --force-color -e create-xml-coverage-reports
|
||||
mv artifacts/coverage/salt.xml artifacts/coverage/salt..${{ inputs.distro-slug }}${{ inputs.fips && '..fips' || '' }}..${{ inputs.nox-session }}.xml
|
||||
mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}${{ inputs.fips && '..fips' || '' }}..${{ inputs.nox-session }}.xml
|
||||
mv artifacts/coverage/salt.xml artifacts/coverage/salt..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
|
||||
- name: Report Salt Code Coverage
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
|
@ -406,12 +456,12 @@ jobs:
|
|||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}${{ inputs.fips && '.fips' || '' }}.${{ inputs.nox-session }}
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}
|
||||
|
||||
- name: Upload Code Coverage DB
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: all-testrun-coverage-artifacts-${{ inputs.distro-slug }}${{ inputs.fips && '-fips' || '' }}-${{ inputs.nox-session }}
|
||||
name: all-testrun-coverage-artifacts-${{ inputs.distro-slug }}.${{ inputs.nox-session }}
|
||||
path: artifacts/coverage
|
||||
include-hidden-files: true
|
||||
|
|
452
.github/workflows/test-action-windows-gh.yml
vendored
452
.github/workflows/test-action-windows-gh.yml
vendored
|
@ -1,452 +0,0 @@
|
|||
---
|
||||
name: Test Artifact(macOS)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
distro-slug:
|
||||
required: true
|
||||
type: string
|
||||
description: The OS slug to run tests against
|
||||
nox-session:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox session to run
|
||||
testrun:
|
||||
required: true
|
||||
type: string
|
||||
description: JSON string containing information about what and how to run the test suite
|
||||
gh-actions-python-version:
|
||||
required: false
|
||||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.11"
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
description: The Salt version to set prior to running tests.
|
||||
cache-prefix:
|
||||
required: true
|
||||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
platform:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform being tested
|
||||
arch:
|
||||
required: true
|
||||
type: string
|
||||
description: The platform arch being tested
|
||||
fips:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
description: Test run with FIPS enabled
|
||||
nox-version:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox version to install
|
||||
package-name:
|
||||
required: false
|
||||
type: string
|
||||
description: The onedir package name to use
|
||||
default: salt
|
||||
skip-code-coverage:
|
||||
required: false
|
||||
type: boolean
|
||||
description: Skip code coverage
|
||||
default: false
|
||||
workflow-slug:
|
||||
required: false
|
||||
type: string
|
||||
description: Which workflow is running.
|
||||
default: ci
|
||||
default-timeout:
|
||||
required: false
|
||||
type: number
|
||||
description: Timeout, in minutes, for the test job(Default 360, 6 hours).
|
||||
default: 360
|
||||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }}
|
||||
PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }}
|
||||
PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }}
|
||||
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
||||
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
|
||||
|
||||
jobs:
|
||||
|
||||
generate-matrix:
|
||||
name: Test Matrix
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix-include: ${{ steps.generate-matrix.outputs.matrix }}
|
||||
build-reports: ${{ steps.generate-matrix.outputs.build-reports }}
|
||||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.10.14
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
with:
|
||||
cache-prefix: ${{ inputs.cache-prefix }}
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
- name: Generate Test Matrix
|
||||
id: generate-matrix
|
||||
run: |
|
||||
tools ci matrix --workflow=${{ inputs.workflow-slug }} ${{ fromJSON(inputs.testrun)['type'] == 'full' && '--full ' || '' }}${{ inputs.fips && '--fips ' || '' }}${{ inputs.distro-slug }}
|
||||
|
||||
test:
|
||||
name: Test
|
||||
runs-on: windows-latest
|
||||
# Full test runs. Each chunk should never take more than 2 hours.
|
||||
# Partial test runs(no chunk parallelization), 6 Hours
|
||||
timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }}
|
||||
needs:
|
||||
- generate-matrix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include) }}
|
||||
env:
|
||||
SALT_TRANSPORT: ${{ matrix.transport }}
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(python3 -c 'import random, sys; sys.stdout.write(str(random.randint(1, 15)))'); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
- name: "Set `TIMESTAMP` environment variable"
|
||||
shell: bash
|
||||
run: |
|
||||
echo "TIMESTAMP=$(date +%s)" | tee -a "$GITHUB_ENV"
|
||||
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Salt Version
|
||||
run: |
|
||||
echo "${{ inputs.salt-version }}" > salt/_version.txt
|
||||
|
||||
- name: Download Onedir Tarball as an Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
path: artifacts/
|
||||
|
||||
- name: Decompress Onedir Tarball
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -c "import os; os.makedirs('artifacts', exist_ok=True)"
|
||||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: Install System Dependencies
|
||||
run: |
|
||||
echo true
|
||||
|
||||
- name: Download nox.windows.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: nox-windows-${{ inputs.arch }}-${{ inputs.nox-session }}
|
||||
|
||||
- name: Set up Python ${{ inputs.gh-actions-python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ inputs.gh-actions-python-version }}"
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
nox --force-color -e decompress-dependencies -- windows ${{ inputs.arch }}
|
||||
|
||||
- name: Download testrun-changed-files.txt
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: testrun-changed-files.txt
|
||||
|
||||
- name: Show System Info
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_SYSTEM_INFO_ONLY: "1"
|
||||
run: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }}
|
||||
|
||||
- name: Run Changed Tests
|
||||
id: run-fast-changed-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --core-tests --slow-tests --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
- name: Run Fast Tests
|
||||
id: run-fast-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code
|
||||
|
||||
- name: Run Slow Tests
|
||||
id: run-slow-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --slow-tests
|
||||
|
||||
- name: Run Core Tests
|
||||
id: run-core-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests
|
||||
|
||||
- name: Run Flaky Tests
|
||||
id: run-flaky-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --flaky-jail
|
||||
|
||||
- name: Run Full Tests
|
||||
id: run-full-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
--slow-tests --core-tests -k "mac or darwin"
|
||||
|
||||
- name: Combine Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false
|
||||
run: |
|
||||
nox --force-color -e combine-coverage
|
||||
|
||||
- name: Prepare Test Run Artifacts
|
||||
id: download-artifacts-from-vm
|
||||
if: always()
|
||||
run: |
|
||||
# Delete the salt onedir, we won't need it anymore and it will prevent
|
||||
# from it showing in the tree command below
|
||||
rm -rf artifacts/salt*
|
||||
tree -a artifacts
|
||||
if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}
|
||||
fi
|
||||
|
||||
- name: Upload 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@v4
|
||||
with:
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/coverage/
|
||||
include-hidden-files: true
|
||||
|
||||
- name: Upload JUnit XML Test Run Artifacts
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/xml-unittests-output/
|
||||
include-hidden-files: true
|
||||
|
||||
- name: Upload Test Run Log Artifacts
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/logs
|
||||
include-hidden-files: true
|
||||
|
||||
report:
|
||||
name: Test Reports
|
||||
if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- test
|
||||
- generate-matrix
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
run: |
|
||||
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
|
||||
|
||||
- name: Merge JUnit XML Test Run Artifacts
|
||||
if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
|
||||
separate-directories: false
|
||||
delete-merged: true
|
||||
|
||||
- name: Merge Log Test Run Artifacts
|
||||
if: always() && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
|
||||
separate-directories: false
|
||||
delete-merged: true
|
||||
|
||||
- name: Merge Code Coverage Test Run Artifacts
|
||||
if: ${{ inputs.skip-code-coverage == false }}
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}
|
||||
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-*
|
||||
separate-directories: false
|
||||
delete-merged: true
|
||||
|
||||
- name: Download Code Coverage Test Run Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
if: ${{ inputs.skip-code-coverage == false }}
|
||||
id: download-coverage-artifacts
|
||||
with:
|
||||
path: artifacts/coverage/
|
||||
pattern: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Show Downloaded Test Run Artifacts
|
||||
if: ${{ inputs.skip-code-coverage == false }}
|
||||
run: |
|
||||
tree -a artifacts
|
||||
|
||||
- name: Set up Python ${{ inputs.gh-actions-python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ inputs.gh-actions-python-version }}"
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
|
||||
- name: Create XML Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
nox --force-color -e create-xml-coverage-reports
|
||||
mv artifacts/coverage/salt.xml artifacts/coverage/salt..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
|
||||
- name: Report Salt Code Coverage
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage -- salt
|
||||
|
||||
- name: Report Combined Code Coverage
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage
|
||||
|
||||
- name: Rename Code Coverage DB
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}
|
||||
|
||||
- name: Upload Code Coverage DB
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: all-testrun-coverage-artifacts-${{ inputs.distro-slug }}.${{ inputs.nox-session }}
|
||||
path: artifacts/coverage
|
||||
include-hidden-files: true
|
212
.github/workflows/test-action-windows.yml
vendored
212
.github/workflows/test-action-windows.yml
vendored
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
name: Test Artifact
|
||||
name: Test Artifact(macOS)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
@ -16,6 +16,11 @@ on:
|
|||
required: true
|
||||
type: string
|
||||
description: JSON string containing information about what and how to run the test suite
|
||||
gh-actions-python-version:
|
||||
required: false
|
||||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.11"
|
||||
salt-version:
|
||||
type: string
|
||||
required: true
|
||||
|
@ -32,20 +37,15 @@ on:
|
|||
required: true
|
||||
type: string
|
||||
description: The platform arch being tested
|
||||
nox-version:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox version to install
|
||||
gh-actions-python-version:
|
||||
required: false
|
||||
type: string
|
||||
description: The python version to run tests with
|
||||
default: "3.10"
|
||||
fips:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
description: Test run with FIPS enabled
|
||||
nox-version:
|
||||
required: true
|
||||
type: string
|
||||
description: The nox version to install
|
||||
package-name:
|
||||
required: false
|
||||
type: string
|
||||
|
@ -69,8 +69,6 @@ on:
|
|||
|
||||
env:
|
||||
COLUMNS: 190
|
||||
AWS_MAX_ATTEMPTS: "10"
|
||||
AWS_RETRY_MODE: "adaptive"
|
||||
PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }}
|
||||
PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }}
|
||||
PIP_EXTRA_INDEX_URL: ${{ vars.PIP_EXTRA_INDEX_URL }}
|
||||
|
@ -88,7 +86,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
python-version: 3.10.14
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
|
@ -112,10 +110,7 @@ jobs:
|
|||
|
||||
test:
|
||||
name: Test
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- linux
|
||||
- bastion
|
||||
runs-on: ${{ inputs.distro-slug }}
|
||||
# Full test runs. Each chunk should never take more than 2 hours.
|
||||
# Partial test runs(no chunk parallelization), 6 Hours
|
||||
timeout-minutes: ${{ fromJSON(inputs.testrun)['type'] == 'full' && inputs.default-timeout || 360 }}
|
||||
|
@ -127,9 +122,11 @@ jobs:
|
|||
include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include) }}
|
||||
env:
|
||||
SALT_TRANSPORT: ${{ matrix.transport }}
|
||||
TEST_GROUP: ${{ matrix.test-group || 1 }}
|
||||
|
||||
steps:
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: "Throttle Builds"
|
||||
shell: bash
|
||||
|
@ -161,19 +158,29 @@ jobs:
|
|||
cd artifacts
|
||||
tar xvf ${{ inputs.package-name }}-${{ inputs.salt-version }}-onedir-${{ inputs.platform }}-${{ inputs.arch }}.tar.xz
|
||||
|
||||
- name: Install System Dependencies
|
||||
run: |
|
||||
echo true
|
||||
|
||||
- name: Download nox.windows.${{ inputs.arch }}.tar.* artifact for session ${{ inputs.nox-session }}
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: nox-windows-${{ inputs.arch }}-${{ inputs.nox-session }}
|
||||
|
||||
- name: PyPi Proxy
|
||||
run: |
|
||||
sed -i '7s;^;--index-url=${{ vars.PIP_INDEX_URL }} --trusted-host ${{ vars.PIP_TRUSTED_HOST }} --extra-index-url=${{ vars.PIP_EXTRA_INDEX_URL }}\n;' requirements/static/ci/*/*.txt
|
||||
|
||||
- name: Setup Python Tools Scripts
|
||||
uses: ./.github/actions/setup-python-tools-scripts
|
||||
- name: Set up Python ${{ inputs.gh-actions-python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
cache-prefix: ${{ inputs.cache-prefix }}
|
||||
python-version: "${{ inputs.gh-actions-python-version }}"
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi.org/simple
|
||||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
nox --force-color -e decompress-dependencies -- windows ${{ inputs.arch }}
|
||||
|
||||
- name: Download testrun-changed-files.txt
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
|
@ -181,115 +188,138 @@ jobs:
|
|||
with:
|
||||
name: testrun-changed-files.txt
|
||||
|
||||
- name: Get Salt Project GitHub Actions Bot Environment
|
||||
run: |
|
||||
TOKEN=$(curl -sS -f -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 30")
|
||||
SPB_ENVIRONMENT=$(curl -sS -f -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/tags/instance/spb:environment)
|
||||
echo "SPB_ENVIRONMENT=$SPB_ENVIRONMENT" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Start VM
|
||||
id: spin-up-vm
|
||||
env:
|
||||
TESTS_CHUNK: ${{ matrix.tests-chunk }}
|
||||
run: |
|
||||
tools --timestamps vm create --environment "${SPB_ENVIRONMENT}" --retries=2 ${{ inputs.distro-slug }}
|
||||
|
||||
- name: List Free Space
|
||||
run: |
|
||||
tools --timestamps vm ssh ${{ inputs.distro-slug }} -- df -h || true
|
||||
|
||||
- name: Upload Checkout To VM
|
||||
run: |
|
||||
tools --timestamps vm rsync ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Decompress .nox Directory
|
||||
run: |
|
||||
tools --timestamps vm decompress-dependencies ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Show System Info
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_SYSTEM_INFO_ONLY: "1"
|
||||
run: |
|
||||
tools --timestamps --timeout-secs=1800 vm test --skip-requirements-install --print-system-information-only \
|
||||
--nox-session=${{ inputs.nox-session }} ${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }}
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }}
|
||||
|
||||
- name: Run Changed Tests
|
||||
id: run-fast-changed-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --core-tests --slow-tests --suppress-no-test-exit-code \
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --core-tests --slow-tests --suppress-no-test-exit-code \
|
||||
--from-filenames=testrun-changed-files.txt
|
||||
|
||||
- name: Run Fast Tests
|
||||
id: run-fast-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['fast'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \
|
||||
${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }}
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code
|
||||
|
||||
- name: Run Slow Tests
|
||||
id: run-slow-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['slow'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --slow-tests
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --slow-tests
|
||||
|
||||
- name: Run Core Tests
|
||||
id: run-core-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' && fromJSON(inputs.testrun)['selected_tests']['core'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --core-tests
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --core-tests
|
||||
|
||||
- name: Run Flaky Tests
|
||||
id: run-flaky-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['selected_tests']['flaky'] }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} \
|
||||
${{ matrix.tests-chunk }} -- --no-fast-tests --flaky-jail
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
-k "mac or darwin" --suppress-no-test-exit-code --no-fast-tests --flaky-jail
|
||||
|
||||
- name: Run Full Tests
|
||||
id: run-full-tests
|
||||
if: ${{ fromJSON(inputs.testrun)['type'] == 'full' }}
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO: "0"
|
||||
RERUN_FAILURES: "1"
|
||||
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: |
|
||||
tools --timestamps --no-output-timeout-secs=1800 --timeout-secs=14400 vm test --skip-requirements-install \
|
||||
--nox-session=${{ inputs.nox-session }} --rerun-failures -E SALT_TRANSPORT ${{ (inputs.skip-code-coverage && matrix.tests-chunk != 'unit') && '--skip-code-coverage' || '' }} \
|
||||
-E TEST_GROUP ${{ matrix.fips && '--fips ' || '' }}${{ inputs.distro-slug }} ${{ matrix.tests-chunk }} -- --slow-tests --core-tests \
|
||||
--test-group-count=${{ matrix.test-group-count || 1 }} --test-group=${{ matrix.test-group || 1 }}
|
||||
nox --force-color -e ${{ inputs.nox-session }} -- ${{ matrix.tests-chunk }} -- \
|
||||
--slow-tests --core-tests -k "mac or darwin"
|
||||
|
||||
- name: Combine Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false && steps.spin-up-vm.outcome == 'success'
|
||||
if: always() && inputs.skip-code-coverage == false
|
||||
run: |
|
||||
tools --timestamps vm combine-coverage ${{ inputs.distro-slug }}
|
||||
nox --force-color -e combine-coverage
|
||||
|
||||
- name: Download Test Run Artifacts
|
||||
- name: Prepare Test Run Artifacts
|
||||
id: download-artifacts-from-vm
|
||||
if: always() && steps.spin-up-vm.outcome == 'success'
|
||||
if: always()
|
||||
run: |
|
||||
tools --timestamps vm download-artifacts ${{ inputs.distro-slug }}
|
||||
# Delete the salt onedir, we won't need it anymore and it will prevent
|
||||
# from it showing in the tree command below
|
||||
rm -rf artifacts/salt*
|
||||
tree -a artifacts
|
||||
if [ "${{ inputs.skip-code-coverage }}" != "true" ]; then
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}.grp${{ matrix.test-group || '1' }}
|
||||
mv artifacts/coverage/.coverage artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ inputs.nox-session }}.${{ matrix.transport }}.${{ matrix.tests-chunk }}
|
||||
fi
|
||||
|
||||
- name: Destroy VM
|
||||
if: always()
|
||||
run: |
|
||||
tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} || true
|
||||
|
||||
- name: Upload 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@v4
|
||||
with:
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }}
|
||||
name: testrun-coverage-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/coverage/
|
||||
include-hidden-files: true
|
||||
|
@ -298,7 +328,7 @@ jobs:
|
|||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }}
|
||||
name: testrun-junit-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/xml-unittests-output/
|
||||
include-hidden-files: true
|
||||
|
@ -307,12 +337,11 @@ jobs:
|
|||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-grp${{ matrix.test-group || '1' }}-${{ env.TIMESTAMP }}
|
||||
name: testrun-log-artifacts-${{ inputs.distro-slug }}-${{ inputs.nox-session }}-${{ matrix.transport }}-${{ matrix.tests-chunk }}-${{ env.TIMESTAMP }}
|
||||
path: |
|
||||
artifacts/logs
|
||||
include-hidden-files: true
|
||||
|
||||
|
||||
report:
|
||||
name: Test Reports
|
||||
if: always() && fromJSON(needs.generate-matrix.outputs.build-reports) && needs.test.result != 'cancelled' && needs.test.result != 'skipped'
|
||||
|
@ -380,6 +409,11 @@ jobs:
|
|||
run: |
|
||||
tree -a artifacts
|
||||
|
||||
- name: Set up Python ${{ inputs.gh-actions-python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ inputs.gh-actions-python-version }}"
|
||||
|
||||
- name: Install Nox
|
||||
run: |
|
||||
python3 -m pip install 'nox==${{ inputs.nox-version }}'
|
||||
|
@ -388,8 +422,8 @@ jobs:
|
|||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
nox --force-color -e create-xml-coverage-reports
|
||||
mv artifacts/coverage/salt.xml artifacts/coverage/salt..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml || true
|
||||
mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml || true
|
||||
mv artifacts/coverage/salt.xml artifacts/coverage/salt..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
mv artifacts/coverage/tests.xml artifacts/coverage/tests..${{ inputs.distro-slug }}..${{ inputs.nox-session }}.xml
|
||||
|
||||
- name: Report Salt Code Coverage
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
|
|
|
@ -75,9 +75,7 @@ jobs:
|
|||
runs-on:
|
||||
# We need to run on our self-hosted runners because we need proper credentials
|
||||
# for boto3 to scan through our repositories.
|
||||
- self-hosted
|
||||
- linux
|
||||
- x86_64
|
||||
- ubuntu-latest
|
||||
outputs:
|
||||
pkg-matrix-include: ${{ steps.generate-pkg-matrix.outputs.matrix }}
|
||||
build-reports: ${{ steps.generate-pkg-matrix.outputs.build-reports }}
|
||||
|
|
|
@ -176,9 +176,19 @@ jobs:
|
|||
- name: Show System Info
|
||||
env:
|
||||
SKIP_REQUIREMENTS_INSTALL: "1"
|
||||
PRINT_TEST_SELECTION: "0"
|
||||
PRINT_TEST_PLAN_ONLY: "0"
|
||||
PRINT_SYSTEM_INFO_ONLY: "1"
|
||||
SKIP_INITIAL_ONEDIR_FAILURES: "1"
|
||||
SKIP_INITIAL_GH_ACTIONS_FAILURES: "1"
|
||||
SKIP_CODE_COVERAGE: "1"
|
||||
PYTHONUTF8: "1"
|
||||
OUTPUT_COLUMNS: "190"
|
||||
GITHUB_ACTIONS_PIPELINE: "1"
|
||||
RAISE_DEPRECATIONS_RUNTIME_ERRORS: "1"
|
||||
TOOLS_DISTRO_SLUG: "${{ inputs.distro-slug }}"
|
||||
run: |
|
||||
nox --force-color -e ${{ inputs.nox-session }}-pkgs -- ${{ matrix.tests-chunk }}
|
||||
env PYTHONUTF8=1 nox --force-color -f noxfile.py -e "${{ inputs.nox-session }}-pkgs" -- ${{ matrix.tests-chunk }}
|
||||
|
||||
- name: Run Package Tests
|
||||
env:
|
||||
|
@ -200,7 +210,7 @@ jobs:
|
|||
run: |
|
||||
# Delete the salt onedir, we won't need it anymore and it will prevent
|
||||
# from it showing in the tree command below
|
||||
rm -rf artifacts/salt*
|
||||
deltree artifacts/salt
|
||||
tree -a artifacts
|
||||
|
||||
- name: Upload Test Run Artifacts
|
||||
|
|
|
@ -399,7 +399,7 @@ def define_jobs(
|
|||
changed_files_contents["workflows"],
|
||||
changed_files_contents["golden_images"],
|
||||
}
|
||||
if any([_.startswith("test:os:macos") for _ in labels]):
|
||||
if "test:os:all" in labels or any([_.startswith("test:os:macos") for _ in labels]):
|
||||
jobs["build-deps-onedir-macos"] = True
|
||||
jobs["build-salt-onedir-macos"] = True
|
||||
if jobs["test-pkg"] and required_pkg_test_changes == {"false"}:
|
||||
|
|
|
@ -119,7 +119,7 @@ TEST_SALT_LISTING = PlatformDefinitions(
|
|||
# ),
|
||||
],
|
||||
"windows": [
|
||||
Windows(slug="windows-2016", display_name="Windows 2016", arch="amd64"),
|
||||
# Windows(slug="windows-2016", display_name="Windows 2016", arch="amd64"),
|
||||
Windows(slug="windows-2019", display_name="Windows 2019", arch="amd64"),
|
||||
Windows(slug="windows-2022", display_name="Windows 2022", arch="amd64"),
|
||||
],
|
||||
|
@ -367,18 +367,18 @@ def generate_workflows(ctx: Context):
|
|||
# ),
|
||||
],
|
||||
"windows": [
|
||||
Windows(
|
||||
slug="windows-2016",
|
||||
display_name="Windows 2016",
|
||||
arch="amd64",
|
||||
pkg_type="NSIS",
|
||||
),
|
||||
Windows(
|
||||
slug="windows-2016",
|
||||
display_name="Windows 2016",
|
||||
arch="amd64",
|
||||
pkg_type="MSI",
|
||||
),
|
||||
# Windows(
|
||||
# slug="windows-2016",
|
||||
# display_name="Windows 2016",
|
||||
# arch="amd64",
|
||||
# pkg_type="NSIS",
|
||||
# ),
|
||||
# Windows(
|
||||
# slug="windows-2016",
|
||||
# display_name="Windows 2016",
|
||||
# arch="amd64",
|
||||
# pkg_type="MSI",
|
||||
# ),
|
||||
Windows(
|
||||
slug="windows-2019",
|
||||
display_name="Windows 2019",
|
||||
|
|
Loading…
Add table
Reference in a new issue