-
Notifications
You must be signed in to change notification settings - Fork 8
32 lines (32 loc) · 1.01 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: build
on: [pull_request, push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e
with:
diagnostic-endpoint:
- uses: DeterminateSystems/magic-nix-cache-action@8a218f9e264e9c3803c9a1ee1c30d8e4ab55be63
with:
diagnostic-endpoint:
- name: No diff
run: |
nix develop -c go mod tidy
nix develop -c go generate ./...
nix develop -c go fmt ./...
git diff --exit-code
- name: Test
run: |
nix develop -c go test -tags sqlite_foreign_keys -v ./...
- name: Build
run: |
nix build --print-build-logs
- name: Check version number
if: startsWith(github.ref_name, 'v')
run: |
if ! ./result/bin/toxstatus version | grep -q '${{ github.ref_name }}'; then
echo "Version information doesn't match"
exit 1
fi