1---
2name: build-and-test
3
4on:
5 workflow_call:
6
7permissions:
8 contents: read
9
10jobs:
11 with-go:
12 strategy:
13 matrix:
14 go-version: [1.24.2]
15 platform: [ubuntu-latest, macos-latest, windows-latest]
16 runs-on: ${{ matrix.platform }}
17 steps:
18 - name: Check out code
19 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20
21 - name: Set up Go ${{ matrix.go-version }}
22 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
23 with:
24 go-version: ${{ matrix.go-version }}
25
26 - name: Build
27 run: make
28
29 - name: Test
30 run: make test
31 env:
32 GITHUB_USER: ${{ vars.TEST_USER_GITHUB }}
33 GITHUB_TOKEN: ${{ secrets.TEST_TOKEN_GITHUB }}
34 GITHUB_TOKEN_PRIVATE: ${{ secrets._GITHUB_TOKEN_PRIVATE }}
35 GITHUB_TOKEN_PUBLIC: ${{ secrets._GITHUB_TOKEN_PUBLIC }}
36 GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }}
37 GITLAB_PROJECT_ID: ${{ secrets.GITLAB_PROJECT_ID }}
38
39 with-node:
40 runs-on: ubuntu-latest
41 strategy:
42 matrix:
43 node-version: [16.x, 18.x, 20.x]
44 defaults:
45 run:
46 working-directory: webui
47 steps:
48 - name: Setup Node.js ${{ matrix.node-version }}
49 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
50 with:
51 node-version: ${{ matrix.node-version }}
52
53 - name: Check out code
54 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
55
56 - uses: DeterminateSystems/nix-installer-action@21a544727d0c62386e78b4befe52d19ad12692e3 # v17
57
58 - uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1
59
60 - name: Install
61 run: make install
62
63 - name: Build
64 run: make build
65
66 - name: Test
67 run: make test
68
69 with-nix:
70 strategy:
71 matrix:
72 platform: [ubuntu-latest, macos-latest]
73 runs-on: ${{ matrix.platform }}
74 steps:
75 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
76
77 - uses: DeterminateSystems/nix-installer-action@21a544727d0c62386e78b4befe52d19ad12692e3 # v17
78
79 - uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1
80
81 - run: nix flake check