mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
85cb59c1a0
simplify test scripts a bit - remove tparse - don't verbose test Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
72 lines
2.2 KiB
YAML
72 lines
2.2 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
pull_request:
|
|
paths:
|
|
- "go.*"
|
|
- "**/*.go"
|
|
- "Taskfile.yml"
|
|
- "Dockerfile"
|
|
- ".github/workflows/*.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
govulncheck:
|
|
uses: caarlos0/meta/.github/workflows/govulncheck.yml@main
|
|
semgrep:
|
|
uses: caarlos0/meta/.github/workflows/semgrep.yml@main
|
|
ruleguard:
|
|
uses: caarlos0/meta/.github/workflows/ruleguard.yml@main
|
|
with:
|
|
args: "-disable largeloopcopy"
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DOCKER_CLI_EXPERIMENTAL: "enabled"
|
|
steps:
|
|
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v3
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v1
|
|
with:
|
|
version: 3.x
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v2
|
|
- uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20 # v3
|
|
- name: setup-snapcraft
|
|
# FIXME: the mkdirs are a hack for https://github.com/goreleaser/goreleaser/issues/1715
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft
|
|
mkdir -p $HOME/.cache/snapcraft/download
|
|
mkdir -p $HOME/.cache/snapcraft/stage-packages
|
|
- uses: crazy-max/ghaction-upx@v3
|
|
with:
|
|
install-only: true
|
|
- uses: cachix/install-nix-action@v26
|
|
with:
|
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4
|
|
with:
|
|
go-version: stable
|
|
- uses: sigstore/cosign-installer@v3.4.0
|
|
- uses: anchore/sbom-action/download-syft@v0.15.10
|
|
- name: setup-validate-krew-manifest
|
|
run: go install sigs.k8s.io/krew/cmd/validate-krew-manifest@latest
|
|
- name: setup
|
|
run: |
|
|
task setup
|
|
task build
|
|
- name: test
|
|
run: task test
|
|
- uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4
|
|
with:
|
|
file: ./coverage.txt
|
|
- run: ./goreleaser check
|
|
- run: git diff
|