mirror of
https://github.com/Luzifer/go_helpers.git
synced 2024-12-25 05:21:20 +00:00
Add test as Github workflow
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
36c4490cff
commit
2afb800b7a
1 changed files with 34 additions and 0 deletions
34
.github/workflows/test.yml
vendored
Normal file
34
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
name: test-and-build
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
go_version:
|
||||||
|
- '1.18'
|
||||||
|
- '1.19'
|
||||||
|
- 'latest'
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: sh
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: golang:${{ matrix.go_version }}
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
GOPATH: /go
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Test code
|
||||||
|
run: go test -v -cover ./...
|
||||||
|
|
||||||
|
...
|
Loading…
Reference in a new issue