Skip to content

Commit

Permalink
CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
gaissmai committed Dec 29, 2023
1 parent 136c2a2 commit 9fbfa74
Showing 1 changed file with 45 additions and 26 deletions.
71 changes: 45 additions & 26 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,58 @@
name: CI

on:
push:
branches: [master]
branches: ["main", "devel"]
paths:
- '**.go'
- '**.yml'

- '**.go'
- '**.yml'
pull_request:
workflow_dispatch:
branches: ["main"]

jobs:
test:
strategy:
matrix:
go-version: ['stable']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: go test -v ./...

govulncheck:
runs-on: ubuntu-latest
steps:
- uses: golang/govulncheck-action@v1
with:
check-latest: true

build:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
check-latest: true

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
check-latest: true
- name: Test Coverage
run: go test -v -coverprofile=profile.cov ./...

- name: Build
run: go build -v ./...
- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov

- name: Test Coverage
run: go test -v -coverprofile=profile.cov ./...
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
check-latest: true

- uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest

0 comments on commit 9fbfa74

Please sign in to comment.