File: ci.yml

package info (click to toggle)
tree-sitter-yaml 0.7.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,212 kB
  • sloc: ansic: 45,252; javascript: 702; makefile: 108; python: 94; lisp: 65; cpp: 13; sh: 9
file content (58 lines) | stat: -rw-r--r-- 1,499 bytes parent folder | download
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CI

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

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

jobs:
  test:
    name: Test parsers
    runs-on: ${{matrix.os}}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          submodules: true
      - name: Set up tree-sitter
        uses: tree-sitter/setup-action/cli@v2
      - name: Run tests
        uses: tree-sitter/parser-test-action@v2
        with:
          generate: false
          test-rust: true
      - name: Set up test suite
        shell: bash
        run: |-
          printf '%s\n' examples/*.yaml > "$RUNNER_TEMP/test-files"
          while read -r file; do
            printf '%s\n' "$file" >> "$RUNNER_TEMP/test-files"
            if [[ -f ${file/in.yaml/error} ]]; then
              printf '%s\n' "$file" >> "$RUNNER_TEMP/invalid-files"
            fi
          done < <(find -L examples/yaml-test-suite/name -name in.yaml)
      - name: Parse test suite
        uses: tree-sitter/parse-action@v4
        with:
          files-list: ${{runner.temp}}/test-files
          invalid-files-list: ${{runner.temp}}/invalid-files