mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
73 lines
1.7 KiB
YAML
73 lines
1.7 KiB
YAML
name: Pull Request
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.x
|
|
- uses: dominikh/staticcheck-action@v1.3.1
|
|
with:
|
|
# version: "2024.1.1"
|
|
install-go: "false" # StaticCheck uses go v1.17 which does not support `any`
|
|
test:
|
|
name: Test
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go-version:
|
|
- 1.23.x
|
|
platform:
|
|
- macos-latest
|
|
- windows-latest
|
|
- ubuntu-latest
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.x
|
|
- name: Run tests
|
|
run: |
|
|
go test -v -coverprofile coverage.out -covermode atomic ./...
|
|
# - name: Publish coverage
|
|
# uses: codecov/codecov-action@v5
|
|
# with:
|
|
# token: ${{ secrets.CODECOV_TOKEN }}
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.x
|
|
- name: Build
|
|
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6
|
|
with:
|
|
version: '~> v2'
|
|
args: --snapshot --skip=publish --debug
|