mirror of
https://github.com/kopia/kopia.git
synced 2026-01-20 20:37:54 -05:00
This way GH caching for Go packages has a chance to work. See https://github.com/actions/setup-go#caching-dependency-files-and-build-outputs * build(providers): checkout repo before setting up Go * build(infra): checkout repo before setting up Go: apply to other workflows as well.
35 lines
798 B
YAML
35 lines
798 B
YAML
name: Code Coverage
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [ master ]
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
tests:
|
|
name: Code Coverage Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.20'
|
|
id: go
|
|
- name: Run Tests
|
|
run: make test-with-coverage
|
|
- name: Upload Coverage
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
files: coverage.txt
|
|
- name: Upload Logs
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: logs
|
|
path: .logs/**/*.log
|
|
if-no-files-found: ignore
|
|
if: ${{ always() }} |