Skip to content

Commit

Permalink
Add a CI pipeline with tests and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsokolovsky committed Feb 23, 2024
1 parent 97be132 commit ce1fd34
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
push:
branches:
- main
pull_request:
branches:
- "**"

concurrency:
group: golangci-lint-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: read

jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- uses: actions/setup-go@v4
with:
go-version: "^1.22.x"

- name: tests
run: |
go test ./... -race -cover
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- uses: actions/setup-go@v4
with:
go-version: "^1.22.x"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.56
args: --timeout=5m --config=.golangci.yaml --issues-exit-code=0

0 comments on commit ce1fd34

Please sign in to comment.