1
0
mirror of https://github.com/makew0rld/amfora.git synced 2025-02-02 15:07:34 -05:00

ci: update golangci and test

This commit is contained in:
makeworld 2024-12-18 17:07:42 -05:00
parent 02f6cc6a79
commit 658cabe840
No known key found for this signature in database
GPG Key ID: 7DE9FA10A6B58CA5
2 changed files with 16 additions and 16 deletions

View File

@ -14,19 +14,26 @@ on:
- '**.desktop'
- 'LICENSE'
permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# Optional: allow write access to checks to allow the action to annotate code in the PR.
checks: write
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
- uses: actions/checkout@v3
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.43
version: v1.60
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true

View File

@ -19,25 +19,18 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ['1.21', '1.22']
go-version: ['1.22', '1.23']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Install make on Windows
if: matrix.os == 'windows-latest'
run: choco install make
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: |
go test -race ./...