Skip to content

Build with Go 1.21 #622

Build with Go 1.21

Build with Go 1.21 #622

Workflow file for this run

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@8ade135a41bc03ea155e62e844d188df1ea18608
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: '^1.21.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@8ade135a41bc03ea155e62e844d188df1ea18608
- uses: cachix/install-nix-action@6a9a9e84a173d90b3ffb42c5ddaf9ea033fad011
- 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@8ade135a41bc03ea155e62e844d188df1ea18608
- uses: cachix/install-nix-action@6a9a9e84a173d90b3ffb42c5ddaf9ea033fad011
- run: nix-shell --run 'goreleaser --snapshot --clean'
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: test-release-dist
path: dist/**/*
retention-days: 2