Skip to content

Commit

Permalink
gh: add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
charlievieth committed Dec 9, 2024
1 parent aa71a4c commit e5f27de
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning
name: CodeQL

on:
push:
branches: [ master, devel ]
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.json'
workflow_dispatch:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: ['go']

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
8 changes: 5 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ jobs:
with:
go-version: ${{ matrix.go }}
- name: Test
run: go test ./...
- name: Test Race
run: go test -race ./...
run: make test
- name: Test Builds
run: make test_build --jobs=4
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit e5f27de

Please sign in to comment.