Tree sitter #182
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: Tree sitter | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
test: | |
name: Test tree-sitter parser | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up tree-sitter | |
uses: tree-sitter/setup-action/cli@v1 | |
- name: Clone tree-sitter-repo | |
run: |- | |
git clone https://github.com/starkware-libs/tree-sitter-cairo --single-branch --depth=1 --filter=blob:none | |
mv tree-sitter-cairo/** . | |
- name: Parse examples | |
uses: tree-sitter/parse-action@v4 | |
with: | |
files: ./**/*.cairo | |
invalid-files: crates/cairo-lang-parser/src/parser_test_data/cairo_test_files/*.cairo | |
notify_failed: | |
runs-on: ubuntu-latest | |
# Do not run on dry_run or success | |
if: always() && !(inputs.dry_run) && contains(needs.*.result, 'failure') | |
needs: [ test ] | |
steps: | |
- name: Notifying about Nightly fail! | |
uses: slackapi/[email protected] | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TREE_SITTER_FAILURE_WEBHOOK }} | |
with: | |
payload: | | |
{ | |
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
} |