CI Setup (#19)

This commit is contained in:
Aleksandr Bezobchuk
2023-03-14 10:23:27 -04:00
committed by GitHub
parent 1c96a6c3c2
commit 0d475f632d
14 changed files with 176 additions and 40 deletions
+25
View File
@@ -0,0 +1,25 @@
name: Lint
on:
push:
branches:
- main
- release/**
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.20.2
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
+35
View File
@@ -0,0 +1,35 @@
name: Tests / Code Coverage
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}-tests
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.20.2
cache: true
cache-dependency-path: go.sum
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
- name: tests
if: env.GIT_DIFF
run: |
make test