Skip to content

codecov: ignore tests and testutil #7055

codecov: ignore tests and testutil

codecov: ignore tests and testutil #7055

Workflow file for this run

name: go tests
on:
pull_request:
push:
branches:
- main*
jobs:
unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21.5'
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go test -coverprofile=coverage.out -covermode=atomic -timeout=5m -race ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
integration_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21.5'
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go test -v -timeout=10m -race github.com/obolnetwork/charon/testutil/integration -integration
compose_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2 # For compose to build images
- uses: actions/setup-go@v4
with:
go-version: '1.21.5'
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: |
echo "CHARON_REPO=$(pwd)" >> $GITHUB_ENV
echo "DOCKER_BUILDKIT=1" >> $GITHUB_ENV
- run: go test -race github.com/obolnetwork/charon/testutil/compose/smoke -v -integration -sudo-perms -timeout=20m -log-dir=.
- uses: actions/upload-artifact@v3
if: always()
with:
name: smoke-test-logs
path: testutil/compose/smoke/*.log
retention-days: 3