Skip to content

Bump codecov/codecov-action from 4.4.0 to 4.4.1 #1611

Bump codecov/codecov-action from 4.4.0 to 4.4.1

Bump codecov/codecov-action from 4.4.0 to 4.4.1 #1611

Workflow file for this run

name: Go CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
name: Continuous Integration
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
permissions:
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5.0.1
with:
go-version-file: go.mod
check-latest: true
- name: Lint
run: |
go install golang.org/x/tools/cmd/goimports
result=$($(go env GOPATH)/bin/goimports -d -e -local github.com/philips-labs/tabia $(go list -f {{.Dir}} ./...))
echo $result
[ -n "$result" ] && exit 1 || exit 0
- name: Get dependencies
run: go mod download
- name: Install tools
run: make install-tools
- name: Build
run: |
make build
- name: Test and Cover
run: go test -v -race -count=1 -covermode=atomic -coverprofile=coverage.out ./...
env:
TABIA_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Code Coverage
uses: codecov/codecov-action@v4.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
release:
name: release
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5.0.1
with:
go-version-file: go.mod
check-latest: true
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Logout from DockerHub Registry
if: ${{ always() }}
run: docker logout