Skip to content

Commit

Permalink
run all examples in pr (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
probablyanewt authored Sep 29, 2024
1 parent b8d1077 commit d590bc8
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/worflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PR checks

on:
pull_request:
types:
- opened
branches:
- main

jobs:
get-examples:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./examples
outputs:
examples: ${{ steps.examples.outputs.examples }}
steps:
- name: Define examples
id: examples
run: echo 'examples=$(ls | jq -R -s -c 'split("\n")[:-1]')' >> "$GITHUB_OUTPUT"

run-examples:
needs: get-examples
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./examples
strategy:
matrix:
example: ${{ needs.get-examples.outputs.examples }}
steps:
- run: cd ${{ matrix.example }}
- run: make run-tests

0 comments on commit d590bc8

Please sign in to comment.