feat: move execution scheduling to Control Plane #5612
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: Code build and checks | |
on: | |
push: | |
branches: [main] | |
paths-ignore: "docs/**" | |
pull_request: | |
paths-ignore: "docs/**" | |
branches: [main] | |
jobs: | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# setup-go@v4 handles Go cache by default | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Setup gotestsum | |
run: go install gotest.tools/gotestsum@latest | |
- name: Unit Test | |
id: unit_test | |
run: gotestsum --format pkgname --junitfile unit-tests.xml --jsonfile unit-tests.json -- -coverprofile=coverage.out -covermode=atomic ./... | |
- name: Unit Test Summary | |
if: always() | |
uses: test-summary/action@v2 | |
with: | |
paths: | | |
unit-tests.xml | |
- name: Annotate Unit Tests | |
if: always() | |
uses: guyarb/[email protected] | |
with: | |
test-results: unit-tests.json | |
- name: Upload code coverage artifact | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: unit-test-coverage | |
path: coverage.out | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Send coverage report to Codecov | |
if: always() | |
uses: codecov/codecov-action@v5 | |
with: | |
file: ./coverage.out | |
flags: unittests | |
name: codecov-testkube-unit-tests | |
verbose: true | |
integration-tests: | |
name: Integration Tests | |
runs-on: ubuntu-latest | |
services: | |
mongo: | |
image: bitnami/mongodb | |
ports: | |
- 27017:27017 | |
nats: | |
image: bitnami/nats | |
ports: | |
- 4222:4222 | |
- 6222:6222 | |
- 8222:8222 | |
minio: | |
image: bitnami/minio | |
ports: | |
- 9000:9000 | |
- 9001:9001 | |
env: | |
MINIO_ROOT_USER: minio99 | |
MINIO_ROOT_PASSWORD: minio123 | |
steps: | |
- uses: actions/checkout@v4 | |
# setup-go@v4 handles Go cache by default | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Set up Java@11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "adopt" | |
java-version: "11" | |
- name: Install node@19 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 19 | |
- name: Install [email protected] | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 8.1.0 | |
- name: Install [email protected] | |
run: npm install -g [email protected] | |
- name: Install [email protected] | |
uses: cpanato/[email protected] | |
with: | |
kubepug-release: "1.7.1" | |
- name: Install k6 | |
run: | | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 | |
echo "deb https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list | |
sudo apt-get update | |
sudo apt-get install k6 | |
- name: Set up [email protected] | |
run: | | |
wget https://downloads.apache.org//jmeter/binaries/apache-jmeter-5.6.3.zip | |
unzip apache-jmeter-5.6.3.zip | |
mv apache-jmeter-5.6.3 jmeter | |
sudo mv jmeter /opt | |
echo "/opt/jmeter/bin" >> $GITHUB_PATH | |
- name: Set up [email protected] | |
run: | | |
npm install -g [email protected] | |
- name: Install [email protected] | |
run: go install github.com/onsi/ginkgo/v2/[email protected] | |
- name: Set up [email protected] | |
run: go install gotest.tools/[email protected] | |
- name: Set up Playwright | |
run: pnpx playwright install --with-deps | |
- name: Set up Tracetest | |
run: curl -L https://raw.githubusercontent.com/kubeshop/tracetest/main/install-cli.sh | bash | |
- name: Set up git | |
run: sudo apt-get install -y git | |
- name: Integration Tests | |
env: | |
STORAGE_ACCESSKEYID: minio99 | |
STORAGE_SECRETACCESSKEY: minio123 | |
run: INTEGRATION=y gotestsum --format pkgname --junitfile integration-tests.xml --jsonfile integration-tests.json -- -run _Integration -coverprofile=coverage.out -covermode=atomic ./... | |
- name: Integration Test Summary | |
if: always() | |
uses: test-summary/action@v2 | |
with: | |
paths: | | |
integration-tests.xml | |
- name: Annotate Integration Tests | |
if: always() | |
uses: guyarb/[email protected] | |
with: | |
test-results: integration-tests.json | |
- name: Upload code coverage artifact | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: integration-test-coverage | |
path: coverage.out | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Send coverage report to Codecov | |
if: always() | |
uses: codecov/codecov-action@v5 | |
with: | |
file: ./coverage.out | |
flags: integrationtests | |
name: codecov-testkube-integration-tests | |
verbose: true |