Skip to content

Commit

Permalink
Use installer list in dynamic matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
iainelder committed Jul 1, 2024
1 parent 401570b commit 4cbe701
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/test_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
workflow_dispatch:

jobs:
list_changes:
name: List changed installers
list_installers:
name: List installers under test
runs-on: ubuntu-latest
outputs:
installers: ${{ github.event_name == 'push' && steps.changed.outputs.changed_installers || steps.all.outputs.all_installers }}
Expand Down Expand Up @@ -49,3 +49,31 @@ jobs:
run: |
echo "$EVENT_NAME"
echo "$EVENT"
test_installers:
name: Test installers
needs: list_installers
runs-on: ubuntu-latest
container:
image: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
installer: ${{ fromJson(needs.list_installers.outputs.installers) }}
os: ["ubuntu:20.04", "ubuntu:22.04"]
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Prepare Docker
run: ./scripts/prepare_docker.bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install ${{matrix.installer}}
shell: su norm --command "bash --login {0}"
run: programs/${{matrix.installer}}/install.bash

- name: Install ${{matrix.installer}} again (test idempotency)
shell: su norm --command "bash --login {0}"
run: programs/${{matrix.installer}}/install.bash

0 comments on commit 4cbe701

Please sign in to comment.