Skip to content

history: test Empty() #34

history: test Empty()

history: test Empty() #34

Workflow file for this run

# SPDX-FileCopyrightText: 2023 Steffen Vogel <post@steffenvogel.de>
# SPDX-License-Identifier: Apache-2.0
name: Test
on:
- push
- pull_request
jobs:
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
check-latest: true
- name: Install Go dependencies
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@v2.9.0
- name: Install system dependencies
run: sudo apt-get install -y
libpcap-dev
- name: Run integration tests
run: >
sudo --preserve-env env "PATH=$PATH"
ginkgo run
-r
--label-filter="integration"
--procs=4
--compilers=4
--randomize-all
--randomize-suites
--keep-going
--cover
--coverpkg=./...
--coverprofile=integration_cover.profile
--race
--trace
--json-report=report.json
--timeout=10m
env:
# Pass token via environment variable to avoid GitHub API rate-limit
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Report integration test coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: integration_cover.profile
flags: integration
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
check-latest: true
- name: Install Go dependencies
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@v2.9.0
- name: Install system dependencies
run: sudo apt-get install -y
libpcap-dev
- name: Run unit tests
run: >
ginkgo run
-r
--label-filter="!integration"
--procs=4
--compilers=4
--randomize-all
--randomize-suites
--keep-going
--cover
--coverpkg=./...
--coverprofile=unit_cover.profile
--race
--trace
--json-report=report.json
--timeout=10m
- name: Report unit test coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: unit_cover.profile
flags: unit