-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github(workflows): add workflow to test fetch-configlet scripts (#690)
Before this commit, the fetch-configlet scripts weren't tested in CI. Add a workflow to test them. The `fetch-configlet.ps1` script currently always fetches the Windows release asset, so this workflow only tests that script on Windows. Closes: #121 Refs: #361
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Fetch configlet | ||
|
||
on: | ||
push: | ||
paths: | ||
- scripts/fetch-configlet* | ||
pull_request: | ||
paths: | ||
- scripts/fetch-configlet* | ||
workflow_dispatch: | ||
|
||
jobs: | ||
fetch_configlet: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: linux | ||
runs-on: ubuntu-22.04 | ||
|
||
- os: mac | ||
runs-on: macos-12 | ||
|
||
- os: windows | ||
runs-on: windows-2022 | ||
|
||
name: fetch-configlet-${{ matrix.os }} | ||
runs-on: ${{ matrix.runs-on }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@e2f20e631ae6d7dd3b768f56a5d2af784dd54791 | ||
|
||
- name: Run fetch-configlet | ||
shell: bash | ||
run: ./scripts/fetch-configlet | ||
|
||
- name: Run the downloaded configlet | ||
env: | ||
EXT: ${{ matrix.os == 'windows' && '.exe' || '' }} | ||
shell: bash | ||
run: | | ||
configlet_path="./bin/configlet${EXT}" | ||
"${configlet_path}" --version | ||
- name: On Windows, also test fetch-configlet.ps1 | ||
if: matrix.os == 'windows' | ||
shell: pwsh | ||
run: | | ||
Remove-Item bin/configlet.exe | ||
scripts/fetch-configlet.ps1 | ||
bin/configlet.exe --version |