-
-
Notifications
You must be signed in to change notification settings - Fork 18
49 lines (46 loc) · 1.51 KB
/
CI.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: CI
permissions: read-all
on:
push:
branches:
- main
pull_request:
jobs:
tests:
strategy:
matrix:
os: ["windows-2022", "ubuntu-22.04", "macos-12"]
runs-on: ${{ matrix.os }}
name: Tests (${{ matrix.os }})
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: '^1.20.0'
- name: Tests
run: "go test -race -coverprofile='coverage.txt' -covermode=atomic -v ./gpg/"
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
with:
token: ${{ secrets.CODECOV_TOKEN }}
static_analysis:
runs-on: ubuntu-22.04
name: Run static analysis and linting
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- run: nix-shell --run 'golangci-lint run --timeout=5m'
test_release:
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
name: Test release
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- uses: cachix/install-nix-action@6ed004b9ccb68dbc28e7c85bee15fa93dbd214ac
- run: nix-shell --run 'goreleaser --snapshot --clean'
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: test-release-dist
path: dist/**/*
retention-days: 2