-
Notifications
You must be signed in to change notification settings - Fork 16
54 lines (42 loc) · 1.23 KB
/
build.yaml
File metadata and controls
54 lines (42 loc) · 1.23 KB
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
name: build-test.yaml
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Increase disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo docker builder prune -a
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install tree-sitter-cli
run: npm install -g tree-sitter-cli
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Caching
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ runner.os }}-build
cache-on-failure: true
- name: Build with cargo
run: cargo build --verbose
- name: Run tree-sitter tests
working-directory: tree-sitter-ggsql
run: tree-sitter test
- name: Run Rust tests
if: success()
run: cargo test --lib --bins
- name: Run Rust formatting check
if: success()
run: cargo fmt --all -- --check