|
|
|
@ -15,25 +15,19 @@ jobs:
|
|
|
|
|
- name: Checkout code |
|
|
|
|
uses: actions/checkout@v4 |
|
|
|
|
|
|
|
|
|
- name: Install jq |
|
|
|
|
run: | |
|
|
|
|
sudo apt-get update |
|
|
|
|
sudo apt-get install -y jq |
|
|
|
|
|
|
|
|
|
- name: Prepare matrix for test files |
|
|
|
|
id: set-matrix |
|
|
|
|
run: | |
|
|
|
|
BATS_FILES=$(find docker-compose/setup-script/tests -name '*.bats') |
|
|
|
|
MATRIX_JSON=$(echo $BATS_FILES | jq -Rsc 'split("\n") | map(select(. != ""))') |
|
|
|
|
echo "matrix=$MATRIX_JSON" >> $GITHUB_ENV |
|
|
|
|
|
|
|
|
|
MATRIX_JSON=$(echo $BATS_FILES | tr -d '\n' | jq -Rsc 'split(" ")' | tr '"' "'") |
|
|
|
|
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT |
|
|
|
|
test: |
|
|
|
|
needs: prepare |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
strategy: |
|
|
|
|
fail-fast: false |
|
|
|
|
matrix: |
|
|
|
|
test: ${{fromJson(env.matrix)}} |
|
|
|
|
test: ${{fromJson(needs.prepare.outputs.matrix)}} |
|
|
|
|
steps: |
|
|
|
|
- name: Checkout repository |
|
|
|
|
uses: actions/checkout@v4 |
|
|
|
|