-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 989 Bytes
/
ci.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
33
34
name: ci
on:
push:
branches: '*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- uses: TimonVS/[email protected]
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/install-nix-action@v17
- uses: cachix/cachix-action@v12
with:
name: cachix-action
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- name: Tests
run: nix develop -c go test -v ./... -test.short
- name: Formatter
run: nix develop -c go fmt ./... || true
- name: Linter
run: nix develop -c golangci-lint run || true
- name: Build
run: nix develop -c go build
- name: Push changes
uses: stefanzweifel/[email protected]
with:
commit_message: Run formatter/linter