Skip to content

Commit 6f8b015

Browse files
committed
tests: add go test CI
1 parent be66c74 commit 6f8b015

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/go-test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Go CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Run go test
14+
runs-on: ubuntu-latest
15+
env:
16+
# TestPatcher:
17+
# absolute path in localsession.json
18+
# TestCases:
19+
# hardcoded obselete json
20+
# Test_goParser_ParseNode:
21+
# test tries to retrieve non-existent node
22+
# TestParser_NodeFieldsConsistency:
23+
# Vars.Content only includes name, not whole body
24+
SKIPPED_TESTS: >-
25+
TestPatcher|TestCases|Test_goParser_ParseNode|TestParser_NodeFieldsConsistency
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Setup Go
32+
uses: actions/setup-go@v5
33+
with:
34+
go-version: '1.22'
35+
36+
- name: Setup Rust toolchain
37+
uses: dtolnay/rust-toolchain@stable
38+
with:
39+
toolchain: stable
40+
components: rust-analyzer
41+
42+
- name: Install gopls
43+
run: go install golang.org/x/tools/gopls@latest
44+
45+
- name: Run all tests
46+
run: go test ./lang/... -skip '${{ env.SKIPPED_TESTS }}'

0 commit comments

Comments
 (0)