ci: add linter, update pr template, variety of cleanups #202
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
types: [opened, synchronize, edited, reopened] | |
push: | |
branches: | |
- main | |
env: | |
GO_VERSION: 1.21.0 | |
jobs: | |
test-unit-coverage: | |
name: Unit & Coverage | |
runs-on: namespace-profile-linux-4vcpu-8gb-cached | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
## skip cache, use Namespace volume cache | |
cache: false | |
- name: Setup Namespace cache | |
uses: namespacelabs/nscloud-cache-action@v1 | |
with: | |
cache: go | |
- name: Run unit tests with coverage | |
run: make test-coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
fail_ci_if_error: true | |
directory: "./" |