Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
push:
branches-ignore:
- main

workflow_dispatch:

permissions:
contents: read

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

jobs:
lint:
name: Perform Code Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set-up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Perform Linting with golangci-lint
uses: golangci/golangci-lint-action@v8

test:
name: Perform Unit Tests and Generate Coverage File
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set-up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Perform Unit Testing
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Generate HTML Coverage
run: go tool cover -html=coverage.out -o coverage.html
- name: Upload Coverage Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: Test Coverage
path: |
./coverage.out
./coverage.html
Loading