Skip to content

feat: Introduce systemd (WIP) #3070

feat: Introduce systemd (WIP)

feat: Introduce systemd (WIP) #3070

Workflow file for this run

name: Tests
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [staging]
paths:
- '**'
- '!.github/**'
- '.github/workflows/gotests.yaml'
jobs:
gounit:
name: Go unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-go@v5
with:
go-version: 1.22.0
cache: false
- name: Set Go variables
id: goenv
run: |
{
echo "cache=$(go env GOCACHE)"
echo "modcache=$(go env GOMODCACHE)"
echo "mod=$(go env GOMOD)"
} >>"$GITHUB_OUTPUT"
- name: Go caches
uses: actions/cache@v4
with:
path: |
${{ steps.goenv.outputs.cache }}
${{ steps.goenv.outputs.modcache }}
key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles(steps.goenv.outputs.mod) }}
restore-keys: |
${{ github.job }}-${{ runner.os }}-go-
- name: Run tests
run: make test-unit
e2e-cli:
name: kraft CLI end-to-end
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.0
cache: false
- name: Set Go variables
id: goenv
run: |
{
echo "cache=$(go env GOCACHE)"
echo "modcache=$(go env GOMODCACHE)"
echo "mod=$(go env GOMOD)"
} >>"$GITHUB_OUTPUT"
- name: Go caches
uses: actions/cache@v4
with:
path: |
${{ steps.goenv.outputs.cache }}
${{ steps.goenv.outputs.modcache }}
key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles(steps.goenv.outputs.mod) }}
restore-keys: |
${{ github.job }}-${{ runner.os }}-go-
- name: Run framework unit tests
env:
KRAFTKIT_NO_WARN_SUDO: true
KRAFTKIT_NO_CHECK_UPDATES: true
DOCKER: ''
run: make test-framework DISTDIR="$(go env GOPATH)"/bin
- name: Run e2e tests
env:
KRAFTKIT_NO_WARN_SUDO: true
KRAFTKIT_NO_CHECK_UPDATES: true
DOCKER: ''
run: make test-e2e DISTDIR="$(go env GOPATH)"/bin