Skip to content

Commit

Permalink
.github(workflows): add workflow to test fetch-configlet scripts (#690)
Browse files Browse the repository at this point in the history
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
ee7 committed Oct 31, 2022
1 parent b6fff14 commit 0be1889
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/fetch-configlet.yml
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

0 comments on commit 0be1889

Please sign in to comment.