Store changes to data. #867
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: | |
push: | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: './go.mod' | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.54 | |
test: | |
name: tests | |
runs-on: ubuntu-latest | |
needs: golangci | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: './go.mod' | |
- run: | | |
go test \ | |
-coverpkg=github.com/lauravuo/vegaanibotti/... \ | |
-coverprofile=coverage.txt \ | |
-covermode=atomic \ | |
./... | |
- run: | | |
mkdir -p coverage | |
GOCOVERDIR=coverage go run -cover . --fetch | |
go tool covdata textfmt -i=coverage -o coverage-run.txt | |
- name: upload coverage | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./coverage.txt,coverage-run.txt | |
fail_ci_if_error: ${{ github.ref_name != 'main' }} | |
verbose: true | |
build: | |
name: build site | |
runs-on: ubuntu-latest | |
needs: golangci | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: "0.114.1" | |
extended: true | |
- name: build | |
run: | | |
cd site | |
hugo --minify |