Skip to content

chore(main): release 2.15.0 #880

chore(main): release 2.15.0

chore(main): release 2.15.0 #880

Workflow file for this run

# Copyright (c) 2023 Tim <tbckr>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# SPDX-License-Identifier: MIT
name: CI Pipeline
on:
push:
tags:
- 'v*'
branches:
- main
- 'renovate/**'
paths:
- '**/*.go'
- '.golangci.yaml'
- '.goreleaser.yaml'
- '.github/workflows/ci.yml'
- 'go.mod'
- 'go.sum'
- 'taskfile.yml'
- 'scripts/gha-test.sh'
pull_request:
branches-ignore:
- 'release-please--*'
paths:
- '**/*.go'
- '.golangci.yaml'
- '.goreleaser.yaml'
- '.github/workflows/ci.yml'
- 'go.mod'
- 'go.sum'
- 'taskfile.yml'
- 'scripts/gha-test.sh'
concurrency:
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checkout repo
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
# Install task.dev
- uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Install various tools
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version-file: go.mod
cache: true
- name: setup-tparse
run: |
go install github.com/mfridman/tparse@latest
# Build executable
- name: build
run: |
task clean
task prepare
task build
# Run tests
- name: test
env:
CI: true
run: ./scripts/gha-test.sh
# Upload coverage report
- uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3
# do not upload coverage for renovate/ branches
if: "!contains(github.ref, 'renovate')"
with:
file: ./coverage.txt
# Check goreleaser config
- uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5
with:
distribution: goreleaser
version: latest
args: check
- run: ./sgpt version
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# Checkout repo
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
# Install Go
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version-file: go.mod
cache: true
# Run linter
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3
with:
args: --timeout=5m --print-issued-lines --print-linter-name -c .golangci.yaml --out-format=github-actions
install-mode: "goinstall"
skip-cache: true
only-new-issues: true
vuln_check:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Install Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version-file: go.mod
cache: true
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...