Skip to content

Commit

Permalink
Add GitHub Actions configuration (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
martialblog authored Aug 28, 2023
1 parent 45ae9f0 commit 2a9c521
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI
on:
push:
branches:
- master
- main
pull_request:

env:
GO_VERSION: '1.20'

jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: lint
uses: golangci/[email protected]
with:
version: latest
# skip cache because of flaky behaviors
skip-build-cache: true
skip-pkg-cache: true
tests:
needs: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Run tests
run: go test -v -cover ./...
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
run:
timeout: 5m

0 comments on commit 2a9c521

Please sign in to comment.