Skip to content

Commit

Permalink
Tie windows installer action into ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
twangboy committed Jul 16, 2024
1 parent 18c3735 commit 66768b3
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ jobs:
- *salt_added_modified
- *tests_added_modified
- *pkg_tests_added_modified
windows-installer:
- added|modified:
- pkg/windows/**
- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand Down Expand Up @@ -245,6 +248,12 @@ jobs:
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
pre-commit-version: "3.0.4"
windows-installer-check:
name: Windows Installer Check
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }}
uses: ./.github/workflows/windows-installer-action.yml
needs:
- prepare-workflow

lint:
name: Lint
Expand Down Expand Up @@ -441,6 +450,7 @@ jobs:
needs:
- prepare-workflow
- build-salt-onedir
- windows-installer-check
uses: ./.github/workflows/build-packages.yml
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
Expand All @@ -455,6 +465,7 @@ jobs:
needs:
- prepare-workflow
- build-salt-onedir
- windows-installer-check
uses: ./.github/workflows/build-packages.yml
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
Expand Down Expand Up @@ -2130,6 +2141,7 @@ jobs:
needs:
- prepare-workflow
- pre-commit
- windows-installer-check
- lint
- build-docs
- build-deps-onedir
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ jobs:
- *salt_added_modified
- *tests_added_modified
- *pkg_tests_added_modified
windows-installer:
- added|modified:
- pkg/windows/**
- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand Down Expand Up @@ -294,6 +297,12 @@ jobs:
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
pre-commit-version: "3.0.4"
windows-installer-check:
name: Windows Installer Check
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }}
uses: ./.github/workflows/windows-installer-action.yml
needs:
- prepare-workflow

lint:
name: Lint
Expand Down Expand Up @@ -495,6 +504,7 @@ jobs:
needs:
- prepare-workflow
- build-salt-onedir
- windows-installer-check
uses: ./.github/workflows/build-packages.yml
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
Expand All @@ -513,6 +523,7 @@ jobs:
needs:
- prepare-workflow
- build-salt-onedir
- windows-installer-check
uses: ./.github/workflows/build-packages.yml
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
Expand Down Expand Up @@ -3025,6 +3036,7 @@ jobs:
- trigger-branch-nightly-builds
- prepare-workflow
- pre-commit
- windows-installer-check
- lint
- build-docs
- build-deps-onedir
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ jobs:
- *salt_added_modified
- *tests_added_modified
- *pkg_tests_added_modified
windows-installer:
- added|modified:
- pkg/windows/**
- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand Down Expand Up @@ -284,6 +287,12 @@ jobs:
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
pre-commit-version: "3.0.4"
windows-installer-check:
name: Windows Installer Check
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }}
uses: ./.github/workflows/windows-installer-action.yml
needs:
- prepare-workflow

lint:
name: Lint
Expand Down Expand Up @@ -480,6 +489,7 @@ jobs:
needs:
- prepare-workflow
- build-salt-onedir
- windows-installer-check
uses: ./.github/workflows/build-packages.yml
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
Expand All @@ -494,6 +504,7 @@ jobs:
needs:
- prepare-workflow
- build-salt-onedir
- windows-installer-check
uses: ./.github/workflows/build-packages.yml
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
Expand Down Expand Up @@ -2171,6 +2182,7 @@ jobs:
- trigger-branch-scheduled-builds
- prepare-workflow
- pre-commit
- windows-installer-check
- lint
- build-docs
- build-deps-onedir
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ jobs:
- *salt_added_modified
- *tests_added_modified
- *pkg_tests_added_modified
windows-installer:
- added|modified:
- pkg/windows/**
- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand Down Expand Up @@ -284,6 +287,12 @@ jobs:
cache-seed: ${{ needs.prepare-workflow.outputs.cache-seed }}
changed-files: ${{ needs.prepare-workflow.outputs.changed-files }}
pre-commit-version: "3.0.4"
windows-installer-check:
name: Windows Installer Check
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }}
uses: ./.github/workflows/windows-installer-action.yml
needs:
- prepare-workflow

lint:
name: Lint
Expand Down Expand Up @@ -480,6 +489,7 @@ jobs:
needs:
- prepare-workflow
- build-salt-onedir
- windows-installer-check
uses: ./.github/workflows/build-packages.yml
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
Expand All @@ -498,6 +508,7 @@ jobs:
needs:
- prepare-workflow
- build-salt-onedir
- windows-installer-check
uses: ./.github/workflows/build-packages.yml
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
Expand Down Expand Up @@ -3028,6 +3039,7 @@ jobs:
- check-requirements
- prepare-workflow
- pre-commit
- windows-installer-check
- lint
- build-docs
- build-deps-onedir
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/templates/build-packages.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
needs:
- prepare-workflow
- build-salt-onedir
- windows-installer-check
uses: ./.github/workflows/build-packages.yml
with:
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/templates/ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@

<%- endif %>

<%- set job_name = "windows-installer-check" %>
<%- if includes.get(job_name, True) %>
<{ job_name }>:
<%- do conclusion_needs.append(job_name) %>
name: Windows Installer Check
if: ${{ fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] && fromJSON(needs.prepare-workflow.outputs.changed-files)['windows-installer'] }}
uses: ./.github/workflows/windows-installer-action.yml
needs:
- prepare-workflow

<%- endif %>


<%- set job_name = "lint" %>
<%- 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 @@ -182,6 +182,9 @@ jobs:
- *salt_added_modified
- *tests_added_modified
- *pkg_tests_added_modified
windows-installer:
- added|modified:
- pkg/windows/**

- name: Set up Python 3.10
uses: actions/setup-python@v5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
name: Test Windows Installer
name: Windows Installer Check

on: pull_request

permissions:
contents: read
on: workflow_call

jobs:
Test-Windows-Installer:
windows-installer-check:
name: Windows Installer Check
runs-on:
- windows-latest

Expand Down

0 comments on commit 66768b3

Please sign in to comment.