Skip to content

Commit 6eed945

Browse files
committed
tests: add ci
1 parent be66c74 commit 6eed945

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/go-test.yml

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

0 commit comments

Comments
 (0)