mirror of
https://github.com/wneessen/go-hibp.git
synced 2024-11-23 13:20:51 +01:00
Winni Neessen
b66183134d
This commit updates the Go versions specified in the GitHub Actions workflows. The versions in 'codecov_testonly.yml', 'golangci-lint.yml', 'codecov.yml', and 'sonarqube.yml' files have been updated to more recent versions. These updates ensure the workflows use up-to-date Go language features and maintain compatibility with the latest Go releases.
40 lines
881 B
YAML
40 lines
881 B
YAML
name: Codecov workflow
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '**.go'
|
|
- 'go.*'
|
|
- '.github/**'
|
|
- 'codecov.yml'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '**.go'
|
|
- 'go.*'
|
|
- '.github/**'
|
|
- 'codecov.yml'
|
|
env:
|
|
HIBP_API_KEY: ${{ secrets.HIBP_API_KEY }}
|
|
jobs:
|
|
run:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
go: ['1.22']
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@master
|
|
|
|
- name: Run Tests
|
|
run: |
|
|
go test -v -race --coverprofile=coverage.coverprofile --covermode=atomic .
|
|
|
|
- name: Upload coverage to Codecov
|
|
if: success() && matrix.go == '1.22' && matrix.os == 'ubuntu-latest'
|
|
uses: codecov/codecov-action@v2
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
|