Skip to content

refactor: split tests and mocks #44

refactor: split tests and mocks

refactor: split tests and mocks #44

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: write
pull-requests: read
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- name: build
run: |
go build ./...
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: gotesttools/gotestfmt-action@v2
- name: test
run: |
set -euo pipefail
go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
lint:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: golangci/golangci-lint-action@v6
- uses: DavidAnson/markdownlint-cli2-action@v17
release:
needs: [build, lint, test]
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- uses: actions/checkout@v4
- uses: go-semantic-release/action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
changelog-generator-opt: "emojis=true"