forked from flexera-public/wstunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.66 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_call:
# Set default permissions
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read # For golangci-lint annotations
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: '1.23'
cache: true
cache-dependency-path: go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
with:
version: latest
- name: Build
run: go build -v ./...
# coverage:
# needs: build
# runs-on: ubuntu-latest
# permissions:
# contents: read
# pull-requests: write # For codecov PR comments
# steps:
# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# - name: Set up Go
# uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
# with:
# go-version: '1.23'
# - name: Generate coverage report
# run: |
# go test -race -coverprofile=coverage.txt -covermode=atomic ./...
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}