Skip to content

Run tests by @samos123 #190

Run tests by @samos123

Run tests by @samos123 #190

Workflow file for this run

name: Tests
run-name: Run tests by @${{ github.actor }}
on:
push:
branches:
- main
pull_request:
jobs:
unit-and-integration:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ">=1.21.0"
- name: Run unit tests
run: make test-unit
- name: Run integration tests
run: make test-integration
e2e-openai:
permissions:
contents: 'read'
id-token: 'write'
strategy:
matrix:
test_cases:
- { case: "openai", replicas: "1", requests: "60", expected_replicas: "1" }
- { case: "openai", replicas: "3", requests: "60", expected_replicas: "1" }
- { case: "openai", replicas: "1", requests: "300", expected_replicas: "2" }
- { case: "openai", replicas: "3", requests: "300", expected_replicas: "2" }
- { case: "pubsub"}
runs-on: ubuntu-latest
name: E2E ${{ toJson(matrix.test_cases) }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: 'google-github-actions/auth@v2'
with:
project_id: 'substratus-integration-tests'
workload_identity_provider: 'projects/489627518739/locations/global/workloadIdentityPools/github-identities/providers/github-com'
create_credentials_file: true
export_environment_variables: true
- name: Install kind
run: |
# For AMD64 / x86_64
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
# For ARM64
[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-arm64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Install skaffold
run: |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64
chmod +x skaffold
sudo mv skaffold /usr/local/bin
- name: Run e2e tests ${{ matrix.test_cases.case }}
env:
OPENAI_LINGO_REPLICAS: ${{ matrix.test_cases.replicas }}
OPENAI_REQUEST_COUNT: ${{ matrix.test_cases.requests }}
OPENAI_EXPECTED_REPLICAS: ${{ matrix.test_cases.expected_replicas }}
run: make test-e2e-${{ matrix.test_cases.case }}