mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 21:21:03 +00:00
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
|
|
|
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3
|
|
|
|
- name: Run golangci-lint
|
|
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
|
|
with:
|
|
install-mode: none
|
|
args: --timeout 5m
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
|
|
|
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3
|
|
|
|
- name: Run tests
|
|
run: go test -v -race -coverpkg=./... -coverprofile=coverage.txt ./...
|
|
|
|
- name: Upload results to Codecov
|
|
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
go-mod-tidy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
|
|
|
- uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3
|
|
|
|
- name: Run go mod tidy
|
|
run: go mod tidy
|
|
|
|
- name: Check uncommitted changes
|
|
run: git diff --exit-code
|
|
|
|
- if: failure()
|
|
run: echo "::error::Check failed, please run 'go mod tidy' and commit the changes."
|