Skip to content

test: fix what tests are run against #282

test: fix what tests are run against

test: fix what tests are run against #282

Workflow file for this run

name: tests
on:
push:
branches:
- master
pull_request:
branches:
- master
- next
jobs:
changed_states:
runs-on: ubuntu-latest
steps:
- id: files
uses: jitterbit/get-changed-files@v1
with:
format: "json"
- id: filter
run: |
echo "filtered_files=$(jq -rMc '[.[] | select(. | contains(".sls")) | select(. | contains("init") | not) | sub("/"; "."; "g") | sub(".sls"; ""; "g")]' <<< '${{ steps.files.outputs.added_modified }}')" > $GITHUB_OUTPUT
outputs:
matrix: ${{ steps.filter.outputs.filtered_files }}
test_states:
needs: changed_states
runs-on: ubuntu-latest
if: ${{ needs.changed_states.outputs.matrix != '[]' }}
strategy:
matrix:
salt: [3006, 3007]
os: [20.04, 22.04]
state: ${{ fromJson(needs.changed_states.outputs.matrix) }}
include:
- os: 20.04
code: focal
- os: 22.04
code: jammy
container:
image: docker://ghcr.io/ekristen/cast-tools/saltstack-tester:${{ matrix.code }}-${{ matrix.salt }}
steps:
- uses: actions/checkout@v4
- name: test-state
run: |
salt-call -l info --file-root . --local --retcode-passthrough --state-output=mixed state.sls ${{ matrix.state }} pillar="{sift_user: root}"