From 081e9119b43d411a0263fe0984e2b5e844df42a7 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Thu, 21 Jul 2022 12:19:36 +0800 Subject: [PATCH] Auto discover and run all [issues] CI --- .github/workflows/rust.yml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 66197633de..c424d8f1a7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -343,16 +343,35 @@ jobs: args: > --manifest-path examples/${{ matrix.path }}/migration/Cargo.toml + issues-matrix: + name: Issues Matrix + needs: init + if: ${{ (needs.init.outputs.run-partial == 'true' && needs.init.outputs.run-issues == 'true') }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + steps: + - uses: actions/checkout@v2 + + - id: set-matrix + run: echo "::set-output name=path_matrix::$(find issues -type f -name '*.toml' -printf '%P\0' | jq -Rs '[ split("\u0000") | .[] | "issues/\(.)" ]')" + outputs: + path_matrix: ${{ steps.set-matrix.outputs.path_matrix }} + issues: name: Issues - needs: init + needs: + - init + - issues-matrix if: ${{ (needs.init.outputs.run-partial == 'true' && needs.init.outputs.run-issues == 'true') }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest] - path: [86, 249, 262, 319, 324, 352, 356, 471, 630, 693] + path: ${{ fromJson(needs.issues-matrix.outputs.path_matrix) }} steps: - uses: actions/checkout@v2 @@ -366,13 +385,13 @@ jobs: with: command: build args: > - --manifest-path issues/${{ matrix.path }}/Cargo.toml + --manifest-path ${{ matrix.path }} - uses: actions-rs/cargo@v1 with: command: test args: > - --manifest-path issues/${{ matrix.path }}/Cargo.toml + --manifest-path ${{ matrix.path }} sqlite: name: SQLite