Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ./...
27 changes: 12 additions & 15 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,36 +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:
- master
- 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
args: --timeout 10m
only-new-issues: true
- name: go-test
run: go test ./...
version: v1.54 # current version at time of commit
args: --timeout=10m
# Only show new issues in a PR but show all issues for pushes
only-new-issues: ${{ github.event_name == 'pull_request' && 'true' || 'false' }}