Skip to content

chore: Bump magnetikonline/action-golang-cache from 4 to 5 #121

chore: Bump magnetikonline/action-golang-cache from 4 to 5

chore: Bump magnetikonline/action-golang-cache from 4 to 5 #121

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
pull_request:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release:
name: Lint, test, coverage and tag if on master
runs-on: ubuntu-latest
steps:
- name: Go with cache setup
uses: magnetikonline/action-golang-cache@v5
with:
go-version: ~1.18
- name: Code checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Go Lint
uses: golangci/golangci-lint-action@v3
with:
working-directory: v2
- name: Run Test
run: |
go test ./v2 -v -cover -covermode=count -coverprofile=coverage.out
go tool cover -func=coverage.out
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: goveralls -coverprofile=coverage.out -service=github
- name: Bump version and push tag
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}