Skip to content

ci: update workflows #27

ci: update workflows

ci: update workflows #27

Workflow file for this run

name: CI
on: [push, pull_request]
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
jobs:
test-parser:
name: Test parser
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1
- name: Test ocaml
working-directory: grammars/ocaml
run: tree-sitter test
- name: Test interface
working-directory: grammars/interface
run: tree-sitter test
- name: Test type
working-directory: grammars/type
run: tree-sitter test
- name: Test highlighting
run: tree-sitter test
parse-examples:
name: Parse examples
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
env:
REPOSITORIES: |
0install/0install
BinaryAnalysisPlatform/bap
janestreet/base
dbuenzli/cmdliner
ocaml/dune
ocaml-multicore/eio
ocsigen/js_of_ocaml
garrigue/lablgtk
ocsigen/lwt
melange-re/melange
ocaml/merlin
ocaml/ocaml
mirage/ocaml-cohttp
ocaml/ocaml-lsp
ocaml-ppx/ocamlformat
ocaml/opam
owlbarn/owl
ocaml-ppx/ppxlib
facebook/pyre-check
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Clone repos
run: |
IFS=$'\n'
for repo in $REPOSITORIES; do
repo_name=$(basename $repo)
git clone https://github.com/$repo.git examples/$repo_name
done
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1
- name: Parse examples
uses: tree-sitter/parse-action@v4
with:
files-list: test/files.txt
invalid-files-list: test/invalid-files.txt
test-go:
name: Test Go binding
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache-dependency-path: bindings/go/go.mod
- name: Get dependencies
working-directory: bindings/go
run: go get -t .
- name: Test
working-directory: bindings/go
run: go test -v
test-node:
name: Test Node binding
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
- name: Install dependencies
run: npm install
- name: Test
run: npm run test-binding
test-rust:
name: Test Rust binding
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build
run: cargo build -v
- name: Test
run: cargo test -v
test-swift:
name: Test Swift binding
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: swift build