mirror of
https://github.com/pnx/tree-sitter-dotenv
synced 2026-06-16 01:54:56 +02:00
adding .github/workflows/ci.yml
This commit is contained in:
parent
911009681d
commit
8a40a33fa9
1 changed files with 69 additions and 0 deletions
69
.github/workflows/ci.yml
vendored
Normal file
69
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- grammar.js
|
||||
- src/**
|
||||
- test/**
|
||||
- bindings/**
|
||||
- tree-sitter.json
|
||||
pull_request:
|
||||
paths:
|
||||
- grammar.js
|
||||
- src/**
|
||||
- test/**
|
||||
- bindings/**
|
||||
- tree-sitter.json
|
||||
|
||||
concurrency:
|
||||
group: ${{github.workflow}}-${{github.ref}}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test parser
|
||||
runs-on: ${{matrix.os}}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up tree-sitter
|
||||
uses: tree-sitter/setup-action/cli@v2
|
||||
- name: Run parser and binding tests
|
||||
uses: tree-sitter/parser-test-action@v2
|
||||
with:
|
||||
test-rust: true
|
||||
- name: Parse sample files
|
||||
uses: tree-sitter/parse-action@v4
|
||||
id: parse-files
|
||||
with:
|
||||
files: examples/**
|
||||
- name: Upload failures artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
if: "!cancelled() && steps.parse-files.outcome == 'failure'"
|
||||
with:
|
||||
name: failures-${{runner.os}}
|
||||
path: ${{steps.parse-files.outputs.failures}}
|
||||
fuzz:
|
||||
name: Fuzz scanner
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: Check for scanner changes
|
||||
id: scanner-check
|
||||
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: Run the fuzzer
|
||||
uses: tree-sitter/fuzz-action@v4
|
||||
if: steps.scanner-check.outputs.changed == 'true'
|
||||
Loading…
Add table
Add a link
Reference in a new issue