Skip to content

test: add basic unit testing #243

test: add basic unit testing

test: add basic unit testing #243

Workflow file for this run

name: Linter
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 #v5
with:
go-version-file: go.mod
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc #v3.7.0
with:
version: latest
only-new-issues: true
super-linter-markdown:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Super-linter
uses: super-linter/super-linter@ff5037c06042e564803502feb97f8a686f3b0171 #v6.0.0
env:
DEFAULT_BRANCH: 'main'
VALIDATE_MARKDOWN: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
reviewdog-misspell:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: misspell
uses: reviewdog/action-misspell@06d6a480724fa783c220081bbc22336a78dbbe82 #v1.15.0
with:
github_token: ${{ secrets.github_token }}
locale: "US"
reviewdog-alex:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- uses: reviewdog/action-alex@83d6502258513773127065a4d8d53c2c84697579 #v1.7.0
goreportcard:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: Run Go report card
run: |
path=$(curl -sf -X POST -F "repo=github.com/$GITHUB_REPOSITORY" https://goreportcard.com/checks | jq -r '.redirect')
echo -e "\nSee report for https://goreportcard.com${path}"