Skip to content

Commit

Permalink
CI: whitelist examples runs
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Dec 14, 2023
1 parent 5539e7c commit b401851
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,24 +226,26 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- run: cargo install --path sea-orm-cli --debug

examples-matrix:
name: Examples Matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: set-matrix
run: echo "path_matrix=$(find examples -mindepth 1 -maxdepth 1 -type d -not -path 'examples/rocket_okapi_example' -printf '%P\0' | jq -Rc '[ split("\u0000") | .[] | "examples/\(.)" ]')" >> $GITHUB_OUTPUT
outputs:
path_matrix: ${{ steps.set-matrix.outputs.path_matrix }}

examples:
name: Examples
runs-on: ubuntu-latest
needs: examples-matrix
strategy:
fail-fast: false
matrix:
path: ${{ fromJson(needs.examples-matrix.outputs.path_matrix) }}
path: [
examples/actix_example,
examples/actix3_example,
# examples/rocket_okapi_example,
examples/jsonrpsee_example,
examples/basic,
examples/salvo_example,
examples/rocket_example,
examples/axum_example,
examples/tonic_example,
examples/seaography_example,
examples/graphql_example,
examples/poem_example,
]
steps:
- uses: actions/checkout@v3
- if: ${{ contains(matrix.path, 'tonic_example') }}
Expand Down

0 comments on commit b401851

Please sign in to comment.