Skip to content

Commit

Permalink
ci: use upstream workflows & actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Feb 25, 2024
1 parent ed12ef0 commit 7722d43
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Test grammar
name: CI

on:
push:
branches: ["*"]
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
pull_request:
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp

Expand All @@ -28,13 +30,13 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Set up repository
uses: tree-sitter-grammars/actions/setup@main
- name: Set up the repo
uses: tree-sitter/parser-setup-action@v1.1
with:
submodules: true
node-version: ${{vars.NODE_VERSION}}
- name: Run tests
uses: tree-sitter-grammars/actions/test@main
uses: tree-sitter/parser-test-action@v1.1
with:
test-library: ${{runner.os == 'Linux'}}
examples: examples/examples/**/*.ino
Expand All @@ -54,5 +56,5 @@ jobs:
printf 'changed=true\n' >> "$GITHUB_OUTPUT"
fi
- name: Fuzz parser
uses: tree-sitter-grammars/tree-sitter-fuzz-action@v3
uses: tree-sitter/fuzz-action@v4
if: steps.scanner-changes.outputs.changed == 'true'
8 changes: 6 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ on:
push:
tags: ["*"]

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
npm:
uses: tree-sitter-grammars/.github/.github/workflows/package-npm.yml@main
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main
secrets:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
crates:
uses: tree-sitter-grammars/.github/.github/workflows/package-crates.yml@main
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
secrets:
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
node-version: ${{vars.NODE_VERSION}}
- name: Update dependencies
id: update
uses: tree-sitter-grammars/actions/update@main
uses: tree-sitter/parser-update-action@v1.1
with:
parent-name: cpp
language-name: arduino

0 comments on commit 7722d43

Please sign in to comment.