Skip to content

fix: Create missing target directories before bind mounting #566

fix: Create missing target directories before bind mounting

fix: Create missing target directories before bind mounting #566

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
---
# SPDX-FileCopyrightText: 2023 Steffen Vogel <post@steffenvogel.de>
# SPDX-License-Identifier: CC0-1.0
name: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install traceroute make libpcap-dev tshark
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- uses: actions/cache@v4
with:
# In order:
# * Module download cache
# * Build cache (Linux)
path: |
/root/go/pkg/mod
/root/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up gotestfmt
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
- name: Test
run: |
sudo --preserve-env \
env "PATH=$PATH" \
go test -coverpkg ./... -coverprofile coverage.out -json -v ./pkg ./internal/... 2>&1 \
| tee /tmp/gotest.log \
| gotestfmt
- name: Upload test log
uses: actions/upload-artifact@v4
if: always()
with:
name: test-log
path: /tmp/gotest.log
if-no-files-found: error
- uses: codecov/codecov-action@v4
with:
files: coverage.out
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}