Skip to content

Bump goreleaser/goreleaser-action from 5.0.0 to 5.1.0 #46

Bump goreleaser/goreleaser-action from 5.0.0 to 5.1.0

Bump goreleaser/goreleaser-action from 5.0.0 to 5.1.0 #46

Workflow file for this run

name: Lint & Test 🕵️‍♂️
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
concurrency:
group: golangci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
golangci:
name: Golang CI 🧹
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Install Go 🐹
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: "1.22"
cache: false
- name: golangci-lint 🕵️‍♂️
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
version: v1.54
unittest:
name: Unit Test 🧪
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Install Go 🐹
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: "1.22"
cache: false
- name: Install gocover-cobertura 📦
run: |
go get github.com/boumenot/gocover-cobertura && go install github.com/boumenot/gocover-cobertura
- name: Set up gotestfmt 📦
uses: GoTestTools/gotestfmt-action@8b4478c7019be847373babde9300210e7de34bfb # v2.2.0
- name: Run tests 🧪
run: sudo go test -race -json -v -coverprofile=coverage.txt ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
- name: Convert go coverage to corbetura format 🔄
run: gocover-cobertura < coverage.txt > coverage.xml
- name: Upload coverage reports to Codecov ☂️
uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
slug: pedrojreis/ScrumChrono
with:
files: ./coverage.xml
- name: Generate code coverage report 📊
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0
with:
filename: coverage.xml
badge: false
fail_below_min: false
format: markdown
hide_branch_rate: false
hide_complexity: true
indicators: true
output: both
thresholds: "60 80"
- name: Add Coverage PR Comment 📌
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md
# Upload the original go test log as an artifact for later review.
- name: Upload test log 📤
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: always()
with:
name: test-log
path: /tmp/gotest.log
if-no-files-found: error