support integration test #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: ['main', 'release/**'] | |
permissions: # added using https://github.com/step-security/secure-workflows | |
contents: read | |
jobs: | |
# | |
# golangci-lint | |
# | |
linters: | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests | |
name: Linters | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/install-go | |
- run: ./tools/scripts/install-golangci-lint | |
- run: | | |
make lint-golang | |
# | |
# Project checks | |
# | |
project: | |
name: Project Checks | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: src/github.com/kcrow-io/kcrow | |
fetch-depth: 100 | |
- uses: ./src/github.com/kcrow-io/kcrow/.github/actions/install-go | |
- name: verify build | |
run: | | |
make binaries | |
working-directory: src/github.com/kcrow-io/kcrow | |
# | |
# Integration on linux | |
# | |
integration-linux: | |
name: Linux Integration | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 40 | |
needs: [project, linters] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: tools/scripts/install-gotestsum | |
- run: tools/scripts/install-teststat | |
- uses: yylt/k3s-gha@master | |
with: | |
k3s_arguments: "--disable=servicelb,traefik,local-storage,metrics-server,runtimes --disable-helm-controller --disable-cloud-controller --disable-network-policy" | |
containerd_toml_path: "./tests/config/containerd-1.x.toml" | |
- uses: ./.github/actions/install-go | |
- name: build and run | |
run: | | |
make binaries | |
(./bin/daemon daemon &) | |
- name: Tests | |
env: | |
GOTESTSUM_JUNITFILE: ${{github.workspace}}/test-unit-root-junit.xml | |
GOTESTSUM_JSONFILE: ${{github.workspace}}/test-unit-root-gotest.json | |
run: | | |
echo TODO |