Skip to content

Update e2e tests, use tls for upstream service #737

Update e2e tests, use tls for upstream service

Update e2e tests, use tls for upstream service #737

Workflow file for this run

name: Build & Lint
# Only trigger the event on pull-requests
on: [pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
# Test the latest release of Go
strategy:
matrix:
go: ["1.24"]
steps:
# Setup the workflow to use the specific version of Go
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
id: go
# Checkout the repository
- name: Checkout
uses: actions/checkout@v2
# Verify downloaded dependencies
- name: Verify dependencies
run: go mod verify
- name: "Create k3d Cluster for E2E testing"
uses: AbsaOSS/k3d-action@v2.4.0
with:
cluster-name: "testcluster"
args: >-
-p "8443:443@loadbalancer"
- name: "Run Tests"
run: |
k3d kubeconfig merge testcluster --kubeconfig-switch-context
export KUBECONFIG=~/.k3d/kubeconfig-testcluster.yaml
kubectl apply -f ./e2e/k8s/manifest.yml
go test -v -timeout=30m -race -coverprofile=profile.cov ./...
# Run Go benchmarks
- name: Benchmark
run: |
go test -run=^$ -bench=. -benchmem ./...
# Run the linter as a separate job
golangci:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.24"]
steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Checkout
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: v2.0.2
args: "--timeout=3m"
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Check Golang sources with Aligo
uses: essentialkaos/aligo-action@v2
with:
files: ./...