add performance tests for namespace-lister #93
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: Lint checks | |
on: # yamllint disable-line rule:truthy | |
pull_request: {} | |
push: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
unit-tests: | |
name: Run unit tests | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Checkout Git Repository | |
uses: actions/checkout@v4 | |
- name: Run tests | |
run: | | |
GINKGO="go run github.com/onsi/ginkgo/v2/ginkgo --github-output" make test | |
performance-tests: | |
name: Run performance tests | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- uses: kubernetes-sigs/kwok@main | |
with: | |
command: 'kwokctl' | |
- name: Set up kwokctl | |
uses: kubernetes-sigs/kwok@main | |
with: | |
command: kwokctl | |
- name: Checkout Git Repository | |
uses: actions/checkout@v4 | |
- name: Run performance tests | |
run: | | |
GINKGO="go run github.com/onsi/ginkgo/v2/ginkgo --github-output" make test-perf | |
acceptance: | |
name: Run acceptance tests | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- proxy: dumb-proxy | |
- proxy: smart-proxy | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Checkout Git Repository | |
uses: actions/checkout@v4 | |
- name: Run tests | |
env: | |
IMAGE_BUILDER: docker | |
IMG: namespace-lister:pr-${{ github.event.pull_request.number }} | |
run: | | |
echo "##[group] Preparing environment" | |
make -C "acceptance/test/${{ matrix.proxy }}" prepare | |
echo "##[endgroup]" | |
echo "##[group] Running tests" | |
make -C "acceptance/test/${{ matrix.proxy }}" test | |
echo "##[endgroup]" | |
lint-go: | |
name: Lint code | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Checkout Git Repository | |
uses: actions/checkout@v4 | |
- name: Determine golang-ci version | |
id: golangci_version | |
run: | | |
echo "version=$(go mod edit -json hack/tools/golang-ci/go.mod | \ | |
jq '.Require | map(select(.Path == "github.com/golangci/golangci-lint"))[].Version')" \ | |
>> $GITHUB_OUTPUT | |
- name: Lint with golang-ci | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: ${{ steps.golangci_version.version }} | |
args: --timeout=5m | |
lint-yaml: | |
name: Lint yaml manifests | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Install yamllint | |
run: | | |
pip install yamllint | |
- name: Checkout Git Repository | |
uses: actions/checkout@v4 | |
- name: Lint with yamllint | |
run: make lint-yaml |