Skip to content

Commit

Permalink
set up ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
daronenko committed Sep 26, 2024
1 parent 36f9a6b commit a3cde60
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
pull_request:
branches:
- main
- develop

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out code into directory
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: 1.23
id: go

- name: Install required dependencies
run: go mod tidy

- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: latest
working-directory: .
args: -c ./.golangci.yaml

test:
name: Run Test
runs-on: ubuntu-latest
steps:
- name: Check out code into directory
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: 1.23
id: go

- name: Install required dependency
run: go mod tidy

- name: Run test
run: make test

- name: View test coverage
run: make view-coverage

- name: Check test coverage
uses: vladopajic/go-test-coverage@v2
with:
profile: coverage.out
local-prefix: github.com/daronenko/auth
threshold-total: 50

0 comments on commit a3cde60

Please sign in to comment.