docs: update github action workflow #45
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.x | |
- name: Build | |
run: make build | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: jontze/action-mdbook@v3 | |
with: | |
mdbook-version: "~0.4.36" | |
token: ${{secrets.GITHUB_TOKEN}} | |
- name: Generate documentation | |
run: make docs | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.x | |
cache: false | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: "v1.54" | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21.x | |
- name: Test | |
run: make cover |