Skip to content

Commit

Permalink
chore: Build with Go 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Aug 4, 2022
1 parent 8602622 commit 29b71e9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 39 deletions.
69 changes: 34 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- v*
env:
AGE_VERSION: 1.0.0
GO_VERSION: 1.18.4
GO_VERSION: 1.19
GOFUMPT_VERSION: 0.3.1
GOLANGCI_LINT_VERSION: 1.47.2
TPARSE_VERSION: 0.11.1
Expand Down Expand Up @@ -113,6 +113,38 @@ jobs:
- name: test
run: |
( cd assets/vagrant && ./test.sh freebsd13 )
test-legacy-go:
strategy:
matrix:
go-version:
- 1.17.x
- 1.18.x
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.code == 'true'
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
with:
cache: true
go-version: ${{ matrix.go-version }}
- name: build
run: |
go build ./...
- name: run
run: |
go run . --version
- name: install-age
run: |
cd $(mktemp -d)
curl -fsSL https://github.com/FiloSottile/age/releases/download/v${AGE_VERSION}/age-v${AGE_VERSION}-linux-amd64.tar.gz | tar xzf -
sudo install -m 755 age/age /usr/local/bin
sudo install -m 755 age/age-keygen /usr/local/bin
- name: test
env:
CHEZMOI_GITHUB_TOKEN: ${{ secrets.CHEZMOI_GITHUB_TOKEN }}
run: |
go test ./...
test-macos:
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.code == 'true'
Expand Down Expand Up @@ -256,39 +288,6 @@ jobs:
with:
name: chezmoi-windows-amd64.exe
path: dist/chezmoi-nocgo_windows_amd64_v1/chezmoi.exe
test-ubuntu-go1-17:
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.code == 'true'
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a
with:
cache: true
go-version: 1.17.x
- uses: actions/cache@0865c47f36e68161719c5b124609996bb5c40129
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-ubuntu-go-1-17-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-ubuntu-go-1-17-
- name: build
run: |
go build ./...
- name: run
run: |
go run . --version
- name: install-age
run: |
cd $(mktemp -d)
curl -fsSL https://github.com/FiloSottile/age/releases/download/v${AGE_VERSION}/age-v${AGE_VERSION}-linux-amd64.tar.gz | tar xzf -
sudo install -m 755 age/age /usr/local/bin
sudo install -m 755 age/age-keygen /usr/local/bin
- name: test
env:
CHEZMOI_GITHUB_TOKEN: ${{ secrets.CHEZMOI_GITHUB_TOKEN }}
run: |
go test ./...
test-website:
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -385,10 +384,10 @@ jobs:
- test-debian-i386
- test-fedora
- test-freebsd
- test-legacy-go
- test-macos
- test-openbsd
- test-ubuntu
- test-ubuntu-go1-17
- test-website
- test-windows
runs-on: ubuntu-18.04
Expand Down
8 changes: 4 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ linters:
- predeclared
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- tagliatelle
- tenv
Expand All @@ -59,7 +56,6 @@ linters:
- unparam
- unused
- varcheck
- wastedassign
- whitespace
disable:
- asasalint
Expand All @@ -85,9 +81,13 @@ linters:
- nonamedreturns
- nosnakecase
- paralleltest
- rowserrcheck # https://github.com/golangci/golangci-lint/issues/2649
- sqlclosecheck # https://github.com/golangci/golangci-lint/issues/2649
- structcheck # https://github.com/golangci/golangci-lint/issues/2649
- testpackage
- tparallel
- varnamelen
- wastedassign # https://github.com/golangci/golangci-lint/issues/2649
- wrapcheck
- wsl

Expand Down

0 comments on commit 29b71e9

Please sign in to comment.