Skip to content

Bump github.com/spf13/cobra from 1.8.0 to 1.8.1 #75

Bump github.com/spf13/cobra from 1.8.0 to 1.8.1

Bump github.com/spf13/cobra from 1.8.0 to 1.8.1 #75

Workflow file for this run

name: Test
# **What it does**: Runs unit and integration tests when go files
# have been modified and provides code coverage reports.
#
# **Why we have it**: Ensures the application is production ready.
#
# **What does it impact**: Application stability.
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
strategy:
matrix:
module: [app]
steps:
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
**/go.mod
**/go.sum
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
if: env.GIT_DIFF || github.ref == 'refs/heads/main'
- run: make test-app
if: |
(env.GIT_DIFF && matrix.module == 'app') ||
github.ref == 'refs/heads/main'
- uses: actions/upload-artifact@v4
with:
name: coverage-app
path: coverage-app.out
overwrite: true
if: |
(env.GIT_DIFF && matrix.module == 'app') ||
github.ref == 'refs/heads/main'
coverage:
runs-on: ubuntu-latest
permissions:
pull-requests: read # for technote-space/get-diff-action to get git reference
needs: [unit]
steps:
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
**/go.mod
**/go.sum
- uses: actions/download-artifact@v4
with:
name: coverage-app
if: env.GIT_DIFF || github.ref == 'refs/heads/main'
- run: make test-coverage
if: env.GIT_DIFF || github.ref == 'refs/heads/main'
- uses: codecov/codecov-action@v4
with:
file: coverage.txt
if: env.GIT_DIFF || github.ref == 'refs/heads/main'