Remove year from copyright #1248
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: build | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
- v* | |
push: | |
branches: | |
- master | |
- v* | |
tags: | |
- v* | |
jobs: | |
build: | |
strategy: | |
matrix: | |
go: [1.19, 1.x] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
name: Go ${{ matrix.go }} ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/[email protected] | |
with: | |
go-version: ${{ matrix.go }} | |
cache: true | |
- name: Build | |
run: go get -v ./... | |
- name: Run tests | |
run: go test ./... | |
examples: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
name: Examples ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.x | |
cache: true | |
- name: Build | |
run: cd _examples && go get -v . | |
- name: Run tests | |
run: cd _examples && go test | |
formatting: | |
runs-on: ubuntu-latest | |
name: Formatting | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.x | |
- name: Check root | |
uses: Jerome1337/[email protected] | |
with: | |
gofmt-path: . | |
gofmt-flags: '-s -l' | |
- name: Check e2e | |
uses: Jerome1337/[email protected] | |
with: | |
gofmt-path: e2e | |
gofmt-flags: '-s -l' | |
- name: Check examples | |
uses: Jerome1337/[email protected] | |
with: | |
gofmt-path: _examples | |
gofmt-flags: '-s -l' | |
linters: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: root | |
dir: . | |
- name: examples | |
dir: _examples | |
name: Linters for ${{ matrix.name }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.x | |
cache: false | |
- name: Run linters | |
uses: golangci/[email protected] | |
timeout-minutes: 20 | |
with: | |
version: v1.63.4 | |
working-directory: ${{ matrix.dir }} | |
args: --timeout=20m | |
coverage: | |
runs-on: ubuntu-latest | |
needs: [build, examples, formatting, linters] | |
name: Coverage | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/[email protected] | |
with: | |
go-version: 1.x | |
cache: true | |
- name: Run tests | |
run: go test -covermode=count -coverprofile=coverage.out -coverpkg=. ./... | |
- name: Prepare coverage report | |
uses: jandelgado/[email protected] | |
- name: Send coverage report | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.lcov |