-
Notifications
You must be signed in to change notification settings - Fork 505
41 lines (39 loc) · 1.26 KB
/
tree-sitter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 }}"
}