mirror of
https://github.com/NotAShelf/goblin.git
synced 2024-11-21 21:00:45 +00:00
CI: groundwork for testing workflow
This commit is contained in:
parent
dffbdf4529
commit
6f2ed94fa2
1 changed files with 40 additions and 0 deletions
40
.github/workflows/go.yml
vendored
Normal file
40
.github/workflows/go.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
name: Go
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- "release-*"
|
||||
|
||||
# Minimal permissions to be inherited by any job that don't declare it's own permissions
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Tests
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
go_version: ["1.19", "1.20", "1.21"]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go ${{ matrix.go_version }}
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go_version }}
|
||||
|
||||
- name: Cache Go modules
|
||||
id: cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: v1-go${{ matrix.go_version }}
|
||||
|
||||
- name: Build the package
|
||||
run: go build -o goblin .
|
Loading…
Reference in a new issue