Debian Codegraph @

.github/workflows/ci.yml

raw symbols SCIP
1 name: Build & Test
2
3 on:
4 # disable integration test run for breaking changes adoption
5 # push:
6 # branches: [ "master" ]
7 pull_request:
8 branches: [ "master" ]
9
10 jobs:
11 lint:
12 runs-on: ubuntu-latest
13 steps:
14 - uses: actions/checkout@v6
15 - name: Set up Go
16 uses: actions/setup-go@v6
17 with:
18 go-version: '1.18'
19 - name: Do format
20 run: |
21 go install golang.org/x/tools/cmd/[email protected]
22 ./build.sh format
23 git status
24 - name: Check format
25 run: |
26 if [[ $(git status --porcelain) ]]; then
27 echo "Error: Please format files via ./build.sh format first ";
28 echo "Found not format files:"
29 git status --porcelain
30 exit 1;
31 fi
32
33 build-ubuntu:
34 runs-on: ubuntu-latest
35 needs: [ lint ]
36 steps:
37 - uses: actions/checkout@v6
38 - name: Set up Go
39 uses: actions/setup-go@v6
40 with:
41 go-version: '1.18'
42
43 - name: Test
44 run: go test -v ./...
45
46 build-windows:
47 needs: [ lint ]
48 runs-on: windows-latest
49 steps:
50 - uses: actions/checkout@v6
51 - name: Set up Go
52 uses: actions/setup-go@v6
53 with:
54 go-version: '1.18'
55
56 - name: Test
57 run: go test -v ./...
58
59 integration-test:
60 needs: [ build-ubuntu, build-windows ]
61 uses: go-echarts/go-echarts-pipeline/.github/workflows/integration.yml@main