debt: Corrected documentation #7
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
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
name: ci | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- 'CHANGELOG/**' | |
- 'CODEOWNERS' | |
- 'docs/**' | |
- 'LICENSE' | |
- '**/*.md' | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
env: | |
flags: "" | |
steps: | |
- name: Preamble | |
run: | | |
whoami | |
echo github ref $GITHUB_REF | |
echo workflow $GITHUB_WORKFLOW | |
echo home $HOME | |
echo event name $GITHUB_EVENT_NAME | |
echo workspace $GITHUB_WORKSPACE | |
df -h | |
sudo DEBIAN_FRONTEND=noninteractive apt-get update | |
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common ca-certificates gnupg-agent curl build-essential make | |
# Ref: https://github.com/actions/checkout | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Ref: https://github.com/actions/setup-go | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
# Ref: https://github.com/golangci/golangci-lint-action | |
- name: Lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
args: --timeout=30m --config=.golangci.yaml --issues-exit-code=0 | |
- name: Test | |
run: | | |
make test | |
- name: Cover | |
run: | | |
make cover | |
- name: Analyze | |
run: | | |
make analyze | |
# Ref: https://github.com/actions/cache | |
- name: Cache SonarCloud Packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar- | |
# Ref: https://github.com/SonarSource/sonarcloud-github-action | |
- name: Scan with SonarCloud | |
uses: sonarsource/sonarcloud-github-action@master | |
with: | |
projectBaseDir: ./ | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
GITHUB_USER: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Benchmark Tests | |
run: | | |
make bench |