
Reviewed-on: #2 Co-authored-by: Ron Rise <ron@siteworxpro.com> Co-committed-by: Ron Rise <ron@siteworxpro.com>
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- "*"
|
|
|
|
name: 🚨 Test Code Base
|
|
run-name: ${{ github.workflow }}-{{ github.ref_name }}-{{ github.run_number }}
|
|
|
|
env:
|
|
GO_VERSION: '1.25.0'
|
|
|
|
jobs:
|
|
test-go:
|
|
name: 🔍 🐹 Go Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: ⚙️ 🐹 Set up Go Environment
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
cache: true
|
|
|
|
- name: 📖 🔍 Checkout Repository Code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: 📦 📥 Install Dependencies
|
|
run: |
|
|
go mod download
|
|
|
|
- name: ✅ 🔍 Run Go Tests
|
|
run: |
|
|
go test -v ./... -coverprofile=coverage.out
|
|
|
|
golangci-lint:
|
|
name: 🧹 Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 📥 Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: 🛠️ Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: 📦 📥 Install Dependencies
|
|
run: |
|
|
go mod download
|
|
|
|
- name: ✅ 🔍 Run Go Lint
|
|
uses: golangci/golangci-lint-action@v8.0.0
|