Merge pull request #87 from vrischmann/dependabot/cargo/cargo-351fff6c5f #557
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 13 * * *" | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up tree-sitter | |
uses: tree-sitter/setup-action/cli@v2 | |
- name: Run tests | |
uses: tree-sitter/parser-test-action@v2 | |
with: | |
test-rust: ${{ runner.os == 'Linux' }} | |
- name: Setup examples | |
run: | | |
git clone https://github.com/a-h/templ.git examples/templ --single-branch --depth=1 --filter=blob:none | |
- name: Parse examples | |
id: examples | |
continue-on-error: true | |
uses: tree-sitter/parse-action@v4 | |
with: | |
files: examples/**/*.templ | |
- uses: actions/upload-artifact@v4 | |
if: steps.examples.outputs.failures != '' | |
with: | |
name: failures-${{ matrix.os }} | |
path: ${{ steps.examples.outputs.failures }} | |
fuzz: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Check for scanner changes | |
id: scanner-changes | |
run: |- | |
if git diff --quiet HEAD^ -- src/scanner.c; then | |
printf 'changed=false\n' >> "$GITHUB_OUTPUT" | |
else | |
printf 'changed=true\n' >> "$GITHUB_OUTPUT" | |
fi | |
- name: Fuzz parser | |
uses: tree-sitter/fuzz-action@v4 | |
if: steps.scanner-changes.outputs.changed == 'true' |