ci: update workflows
- Replace build workflow with CI & fuzz - Add GitHub & NPM release workflow
This commit is contained in:
committed by
Michael Hoffmann
parent
c3172d7873
commit
009def4ae3
65
.github/workflows/ci.yaml
vendored
Normal file
65
.github/workflows/ci.yaml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- grammar.js
|
||||
- make_grammar.js
|
||||
- src/**
|
||||
- test/**
|
||||
- example/**
|
||||
- bindings/**
|
||||
- binding.gyp
|
||||
pull_request:
|
||||
paths:
|
||||
- grammar.js
|
||||
- make_grammar.js
|
||||
- src/**
|
||||
- test/**
|
||||
- example/**
|
||||
- bindings/**
|
||||
- binding.gyp
|
||||
|
||||
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@v1
|
||||
- name: Regenerate with ABI 14
|
||||
# TODO: remove when node & swift support ABI 15
|
||||
run: |-
|
||||
tree-sitter generate --abi=14
|
||||
cd dialects/terraform
|
||||
tree-sitter generate --abi=14
|
||||
- name: Run parser and binding tests
|
||||
uses: tree-sitter/parser-test-action@v2
|
||||
with:
|
||||
test-node: true
|
||||
test-rust: ${{runner.os == 'Linux'}}
|
||||
test-swift: ${{runner.os == 'macOS'}}
|
||||
- name: Parse sample files
|
||||
uses: tree-sitter/parse-action@v4
|
||||
id: parse-files
|
||||
with:
|
||||
files: |-
|
||||
example/**/*.hcl
|
||||
example/**/*.tf
|
||||
- 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}}
|
||||
Reference in New Issue
Block a user