Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vimystic committed Feb 13, 2025
1 parent 07029df commit 146723c
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: Go

on:
push:
branches:
- main
pull_request:
on: [push, pull_request]

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.22'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
only-new-issues: false
args: --timeout=5m
- name: Checkout code
uses: actions/checkout@v2

test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.22'
- name: unit tests
run: make test
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16'

- name: Cache Go modules
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: Install dependencies
run: go mod download

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=5m --out-format=colored-line-number

0 comments on commit 146723c

Please sign in to comment.