diff --git a/.github/workflows/tools-ci.yml b/.github/workflows/tools-ci.yml index f593d120..08e4cf21 100644 --- a/.github/workflows/tools-ci.yml +++ b/.github/workflows/tools-ci.yml @@ -16,13 +16,28 @@ env: CARGO_TERM_COLOR: always jobs: + generate-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Generate matrix + id: set-matrix + run: | + tools=$(ls tools) + tools_json=$(echo $tools | jq -R -s -c 'split("\n") | map(select(length > 0))') + echo "::set-output name=matrix::${tools_json}" + # Run cargo test test: name: Runs Tests runs-on: ubuntu-latest strategy: matrix: - tool: [$(ls tools)] + tool: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} timeout-minutes: 30 steps: - name: Checkout sources @@ -49,7 +64,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - tool: [$(ls tools)] + tool: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} timeout-minutes: 30 steps: - name: Checkout sources @@ -78,7 +93,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - tool: [$(ls tools)] + tool: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} timeout-minutes: 30 steps: - name: Checkout sources