Debian Codegraph @

.github/workflows/ci.yml

raw
1 name: ci
2
3 concurrency:
4 group: ${{ github.workflow }}-${{ github.ref }}
5 cancel-in-progress: true
6
7 env:
8 DESTDIR: ./bin
9
10 on:
11 workflow_dispatch:
12 schedule:
13 - cron: '0 8 */6 * *' # every 6 days
14 push:
15 branches:
16 - main
17 pull_request:
18
19 jobs:
20 build:
21 runs-on: ubuntu-latest
22 strategy:
23 matrix:
24 target:
25 - build
26 - cross
27 steps:
28 - uses: actions/checkout@v4
29 - uses: docker/setup-buildx-action@v3
30 -
31 name: Run
32 uses: docker/bake-action@v5
33 with:
34 targets: ${{ matrix.target }}
35
36 test:
37 runs-on: ubuntu-latest
38 strategy:
39 matrix:
40 go:
41 - "1.23"
42 - "1.22"
43 - "1.21"
44 env:
45 GO_VERSION: ${{ matrix.go }}
46 steps:
47 - uses: actions/checkout@v4
48 - uses: docker/setup-buildx-action@v3
49 -
50 name: Test
51 uses: docker/bake-action@v5
52 with:
53 targets: test
54
55 test-os:
56 runs-on: ${{ matrix.os }}
57 strategy:
58 fail-fast: false
59 matrix:
60 os:
61 - macos-latest
62 - windows-latest
63 go:
64 - "1.23"
65 - "1.22"
66 - "1.21"
67 steps:
68 - uses: actions/checkout@v4
69 -
70 name: Set up Go
71 uses: actions/setup-go@v5
72 with:
73 go-version: ${{ matrix.go }}
74 -
75 name: Test
76 run: |
77 go test -v ./...