Add common workflows and files #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+*" | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Golang Environment | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Build | |
run: go build -v ./... | |
test: | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: [ | |
oldstable, | |
stable, | |
] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Golang Environment | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Run Unit Tests | |
run: go test -v -cover -race -shuffle=on ./... | |
draft-release: | |
runs-on: ubuntu-24.04 | |
if: github.event_name != 'pull_request' | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Create/Update Draft Release | |
uses: lucacome/[email protected] | |
with: | |
minor-label: "enhancement" | |
major-label: "change" | |
collapse-after: 20 |