Skip to content
Open
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
51 changes: 51 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
name: ${{ matrix.os }} / ${{ matrix.go-version || 'minimum' }}
strategy:
matrix:
go-version:
- "" # empty: use go.mod; see https://github.com/actions/setup-go/issues/450#issuecomment-3620402646
- oldstable
- stable
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
cache: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caching might be OK here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, I think this was zizmor flagging it, so I kept it for now (probably won't make much difference for this repository).

go-version: ${{ matrix.go-version }}
go-version-file: ./go.mod # used when go-version is not specified.

- name: lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.11
args: --timeout=10m --verbose

- name: Test
run: go test -v -cover "-coverprofile=coverage.txt" -covermode=atomic ./...
shell: bash
env:
MSYS_NO_PATHCONV: '1'

- name: Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
directory: ./
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if codecov is still needed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took some other repositories as a bit of a template; not really tied to CodeCov, but also thought it wouldn't really hurt; happy to remove though if you prefer, let me know 👍

11 changes: 0 additions & 11 deletions circle.yml

This file was deleted.

Loading