Skip to content

Update go dependency to 1.22; update yaml dep to avoid CVE #23

Update go dependency to 1.22; update yaml dep to avoid CVE

Update go dependency to 1.22; update yaml dep to avoid CVE #23

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
deps:
strategy:
matrix:
version: ['1.22.0']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: ./.github/actions/setup-go
with:
go-version: ${{ matrix.version }}
test:
permissions:
contents: read
issues: write
pull-requests: write
needs: ["deps"]
strategy:
matrix:
version: ['1.22.0']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: ./.github/actions/setup-go
with:
go-version: ${{ matrix.version }}
- name: Main branch coverage
uses: actions/cache@v3
if: matrix.version == '1.22.0'
with:
path: |
main.lcov
key: ${{ runner.os }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-refs/heads/main-
- name: Test
run: go test -v -coverprofile coverage.out -race ./...
- name: Bench
run: go test -v -run ^$ -bench . ./...
- uses: jandelgado/gcov2lcov-action@v1.0.9
if: matrix.version == '1.22.0'
- name: Store main branch lcov
if: github.ref == 'refs/heads/main' && matrix.version == '1.22.0'
run: cp coverage.lcov main.lcov
- name: Code Coverage Report
uses: osmind-development-org/lcov-reporter-action@v0.3.2
if: matrix.version == '1.22.0' && github.event_name == 'pull_request'
with:
lcov-file: ./coverage.lcov
lcov-base: ./main.lcov
delete-old-comments: true
github-token: ${{ secrets.GITHUB_TOKEN }}