Skip to content

Commit

Permalink
Merge branch '3006.x' into fix-stdin_raw_newlines-for-timed_subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
twangboy authored Sep 18, 2024
2 parents 181bb70 + c54a8ce commit db23bac
Show file tree
Hide file tree
Showing 44 changed files with 537 additions and 250 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ jobs:
- pkg/**
- *pkg_requirements
- *salt_added_modified
nsis_tests:
- added|modified: &nsis_tests
- pkg/windows/nsis/**
testrun:
- added|modified:
- *pkg_requirements
Expand Down Expand Up @@ -254,6 +257,14 @@ jobs:
- prepare-workflow
with:
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
nsis-tests:
name: NSIS Tests
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
uses: ./.github/workflows/nsis-tests.yml
needs:
- prepare-workflow
with:
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}

prepare-release:
name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}"
Expand Down Expand Up @@ -1516,27 +1527,6 @@ jobs:
workflow-slug: ci
default-timeout: 180

archlinux-lts:
name: Arch Linux LTS Test
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-ci-deps
uses: ./.github/workflows/test-action-linux.yml
with:
distro-slug: archlinux-lts
nox-session: ci-test-onedir
platform: linux
arch: x86_64
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.14
skip-code-coverage: ${{ fromJSON(needs.prepare-workflow.outputs.testrun)['skip_code_coverage'] }}
workflow-slug: ci
default-timeout: 180

debian-11:
name: Debian 11 Test
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] && contains(fromJSON(needs.prepare-workflow.outputs.os-labels), 'debian-11') }}
Expand Down Expand Up @@ -1984,7 +1974,6 @@ jobs:
- amazonlinux-2-arm64
- amazonlinux-2023
- amazonlinux-2023-arm64
- archlinux-lts
- debian-11
- debian-11-arm64
- debian-12
Expand Down Expand Up @@ -2131,6 +2120,7 @@ jobs:
- prepare-workflow
- pre-commit
- lint
- nsis-tests
- build-docs
- build-deps-onedir
- build-salt-onedir
Expand All @@ -2151,7 +2141,6 @@ jobs:
- amazonlinux-2-arm64
- amazonlinux-2023
- amazonlinux-2023-arm64
- archlinux-lts
- debian-11
- debian-11-arm64
- debian-12
Expand Down
35 changes: 12 additions & 23 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ jobs:
- pkg/**
- *pkg_requirements
- *salt_added_modified
nsis_tests:
- added|modified: &nsis_tests
- pkg/windows/nsis/**
testrun:
- added|modified:
- *pkg_requirements
Expand Down Expand Up @@ -303,6 +306,14 @@ jobs:
- prepare-workflow
with:
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
nsis-tests:
name: NSIS Tests
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
uses: ./.github/workflows/nsis-tests.yml
needs:
- prepare-workflow
with:
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}

prepare-release:
name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}"
Expand Down Expand Up @@ -1578,27 +1589,6 @@ jobs:
workflow-slug: nightly
default-timeout: 360

archlinux-lts:
name: Arch Linux LTS Test
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-ci-deps
uses: ./.github/workflows/test-action-linux.yml
with:
distro-slug: archlinux-lts
nox-session: ci-test-onedir
platform: linux
arch: x86_64
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.14
skip-code-coverage: false
workflow-slug: nightly
default-timeout: 360

debian-11:
name: Debian 11 Test
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
Expand Down Expand Up @@ -2046,7 +2036,6 @@ jobs:
- amazonlinux-2-arm64
- amazonlinux-2023
- amazonlinux-2023-arm64
- archlinux-lts
- debian-11
- debian-11-arm64
- debian-12
Expand Down Expand Up @@ -2953,7 +2942,6 @@ jobs:
- amazonlinux-2-arm64
- amazonlinux-2023
- amazonlinux-2023-arm64
- archlinux-lts
- debian-11
- debian-11-arm64
- debian-12
Expand Down Expand Up @@ -3026,6 +3014,7 @@ jobs:
- prepare-workflow
- pre-commit
- lint
- nsis-tests
- build-docs
- build-deps-onedir
- build-salt-onedir
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/nsis-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
name: Test NSIS Installer

on:
workflow_call:
inputs:
changed-files:
required: true
type: string
description: JSON string containing information about changed files

jobs:
Test-NSIS-Logic:
name: Logic Tests
runs-on:
- windows-latest
if: ${{ contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name) || fromJSON(inputs.changed-files)['nsis_tests'] }}

steps:

- name: Checkout Salt
uses: actions/checkout@v4

- name: Set Up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install NSIS
run: .\pkg\windows\install_nsis.cmd -CICD
shell: cmd

- name: Build Test Installer
run: .\pkg\windows\nsis\tests\setup.cmd -CICD
shell: cmd

- name: Run Config Tests
run: .\pkg\windows\nsis\tests\test.cmd -CICD .\config_tests
shell: cmd

Test-NSIS-Stress:
name: Stress Tests
runs-on:
- windows-latest
if: ${{ contains(fromJSON('["push", "schedule", "workflow_dispatch"]'), github.event_name) || fromJSON(inputs.changed-files)['nsis_tests'] }}

steps:

- name: Checkout Salt
uses: actions/checkout@v4

- name: Set Up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install NSIS
run: .\pkg\windows\install_nsis.cmd -CICD
shell: cmd

- name: Build Test Installer
run: .\pkg\windows\nsis\tests\setup.cmd -CICD
shell: cmd

- name: Run Stress Test
run: .\pkg\windows\nsis\tests\test.cmd -CICD .\stress_tests
shell: cmd
35 changes: 12 additions & 23 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ jobs:
- pkg/**
- *pkg_requirements
- *salt_added_modified
nsis_tests:
- added|modified: &nsis_tests
- pkg/windows/nsis/**
testrun:
- added|modified:
- *pkg_requirements
Expand Down Expand Up @@ -293,6 +296,14 @@ jobs:
- prepare-workflow
with:
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
nsis-tests:
name: NSIS Tests
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
uses: ./.github/workflows/nsis-tests.yml
needs:
- prepare-workflow
with:
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}

prepare-release:
name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}"
Expand Down Expand Up @@ -1555,27 +1566,6 @@ jobs:
workflow-slug: scheduled
default-timeout: 360

archlinux-lts:
name: Arch Linux LTS Test
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-ci-deps
uses: ./.github/workflows/test-action-linux.yml
with:
distro-slug: archlinux-lts
nox-session: ci-test-onedir
platform: linux
arch: x86_64
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.14
skip-code-coverage: false
workflow-slug: scheduled
default-timeout: 360

debian-11:
name: Debian 11 Test
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
Expand Down Expand Up @@ -2023,7 +2013,6 @@ jobs:
- amazonlinux-2-arm64
- amazonlinux-2023
- amazonlinux-2023-arm64
- archlinux-lts
- debian-11
- debian-11-arm64
- debian-12
Expand Down Expand Up @@ -2172,6 +2161,7 @@ jobs:
- prepare-workflow
- pre-commit
- lint
- nsis-tests
- build-docs
- build-deps-onedir
- build-salt-onedir
Expand All @@ -2192,7 +2182,6 @@ jobs:
- amazonlinux-2-arm64
- amazonlinux-2023
- amazonlinux-2023-arm64
- archlinux-lts
- debian-11
- debian-11-arm64
- debian-12
Expand Down
34 changes: 12 additions & 22 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ jobs:
- pkg/**
- *pkg_requirements
- *salt_added_modified
nsis_tests:
- added|modified: &nsis_tests
- pkg/windows/nsis/**
testrun:
- added|modified:
- *pkg_requirements
Expand Down Expand Up @@ -293,6 +296,14 @@ jobs:
- prepare-workflow
with:
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
nsis-tests:
name: NSIS Tests
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
uses: ./.github/workflows/nsis-tests.yml
needs:
- prepare-workflow
with:
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}

prepare-release:
name: "Prepare Release: ${{ needs.prepare-workflow.outputs.salt-version }}"
Expand Down Expand Up @@ -1563,27 +1574,6 @@ jobs:
workflow-slug: staging
default-timeout: 180

archlinux-lts:
name: Arch Linux LTS Test
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
needs:
- prepare-workflow
- build-ci-deps
uses: ./.github/workflows/test-action-linux.yml
with:
distro-slug: archlinux-lts
nox-session: ci-test-onedir
platform: linux
arch: x86_64
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.14
skip-code-coverage: true
workflow-slug: staging
default-timeout: 180

debian-11:
name: Debian 11 Test
if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
Expand Down Expand Up @@ -2906,7 +2896,6 @@ jobs:
- amazonlinux-2-arm64
- amazonlinux-2023
- amazonlinux-2023-arm64
- archlinux-lts
- debian-11
- debian-11-arm64
- debian-12
Expand Down Expand Up @@ -3023,6 +3012,7 @@ jobs:
- prepare-workflow
- pre-commit
- lint
- nsis-tests
- build-docs
- build-deps-onedir
- build-salt-onedir
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/templates/ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@

<%- endif %>

<%- set job_name = "nsis-tests" %>
<%- if includes.get(job_name, True) %>
<{ job_name }>:
<%- do conclusion_needs.append(job_name) %>
name: NSIS Tests
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
uses: ./.github/workflows/nsis-tests.yml
needs:
- prepare-workflow
with:
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}

<%- endif %>

<%- set job_name = "prepare-release" %>
<%- if includes.get(job_name, True) %>
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/templates/layout.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ jobs:
- pkg/**
- *pkg_requirements
- *salt_added_modified
nsis_tests:
- added|modified: &nsis_tests
- pkg/windows/nsis/**
testrun:
- added|modified:
- *pkg_requirements
Expand Down
Loading

0 comments on commit db23bac

Please sign in to comment.