Skip to content

Commit

Permalink
Merge pull request #46 from blinklabs-io/ci/update-golangci-lint
Browse files Browse the repository at this point in the history
ci: update golangci-lint and split go-test to separate workflow
  • Loading branch information
agaffney authored Oct 6, 2023
2 parents c5b2bae + 3f4bcf2 commit 3283762
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 13 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: go-test

on:
push:
tags:
- v*
branches:
- main
pull_request:

jobs:
go-test:
name: go-test
strategy:
matrix:
go-version: [1.20.x, 1.21.x]
# XXX: is it actually useful to run unit tests on macOS?
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: go-test
run: go test ./...
24 changes: 11 additions & 13 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
# This file was copied from the following URL and modified:
# https://github.com/golangci/golangci-lint-action/blob/master/README.md#how-to-use

name: golangci
name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
pull_request:

permissions:
contents: read
pull-requests: read

jobs:
golangci:
name: lint
strategy:
matrix:
go-version: [1.20.x, 1.21.x]
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
go-version: 1.21.x
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3 # current version at time of commit
version: v1.54 # current version at time of commit
args: --timeout=10m
only-new-issues: true
- name: go-test
run: go test ./...
# Only show new issues in a PR but show all issues for pushes
only-new-issues: ${{ github.event_name == 'pull_request' && 'true' || 'false' }}

0 comments on commit 3283762

Please sign in to comment.