Skip to content

Commit

Permalink
Auto discover and run all [issues] CI
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Jul 21, 2022
1 parent 1385b74 commit 081e911
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 081e911

Please sign in to comment.