Skip to content

test: lint fixes

test: lint fixes #14

Workflow file for this run

---
name: Unit Test
on:
push:
branches: [latest]
paths:
- '**.go'
- '.github/workflows/unit_test.yml'
- 'scripts/unit_test.sh'
- 'examples/acme.yml'
pull_request:
branches: [latest]
paths:
- '**.go'
- '.github/workflows/unit_test.yml'
- 'scripts/unit_test.sh'
- 'examples/acme.yml'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: ${{ github.ref }}
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
cache: true
- name: Restore Go Cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: |
sudo apt install git
go install gotest.tools/gotestsum@latest
- name: Download module-dependencies
run: go mod tidy
- name: Building Go Binary
run: bash scripts/build.sh
env:
MODE_TEST: '1'
- name: Running Go Tests
run: bash scripts/unit_test.sh
- name: Testing check-mode (validating example-config)
run: build/acme -path-cnf $(pwd)/examples/acme.yml -check