-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
11,569 additions
and
203 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build and push SDK Test Runner | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: 'Version string for SDK Test Runner release' | ||
type: string | ||
required: true | ||
docker_context: | ||
type: string | ||
description: 'Directory where dockerfile exists' | ||
required: true | ||
image_name: | ||
type: string | ||
description: 'Docker image name' | ||
required: true | ||
|
||
env: | ||
VERSION: 1.1.0 | ||
|
||
PROJECT_ID: ${{ vars.SDK_TESTING_PROJECT_ID }} | ||
REGION: ${{ vars.SDK_TESTING_REGION }} | ||
GAR_LOCATION: ${{ vars.SDK_TESTING_REGION }}-docker.pkg.dev/${{ vars.SDK_TESTING_PROJECT_ID }}/sdk-testing | ||
|
||
|
||
jobs: | ||
build-and-upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
# Set up gCloud | ||
- id: "auth" | ||
uses: "google-github-actions/auth@v1" | ||
with: | ||
credentials_json: "${{ secrets.SERVICE_ACCOUNT_KEY }}" | ||
|
||
- name: "Set up Cloud SDK" | ||
uses: "google-github-actions/setup-gcloud@v1" | ||
|
||
- name: "Use gcloud CLI" | ||
run: "gcloud info" | ||
|
||
# Allow docker access to the GAR | ||
- name: "Docker auth" | ||
run: |- | ||
gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet | ||
# Build and push | ||
- name: Build and export | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
context: ${{ inputs.docker_context }} | ||
tags: ${{ env.GAR_LOCATION }}/${{ inputs.image_name }}:latest,${{ env.GAR_LOCATION }}/${{ inputs.image_name }}:${{ env.VERSION }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Build and push SDK Test Runner | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version string for SDK Test Runner release' | ||
required: true | ||
default: '1.0.0' | ||
|
||
push: | ||
paths: | ||
.github/workflows/release-sdk-test-runner.yml | ||
|
||
jobs: | ||
build-and-upload: | ||
uses: ./.github/workflows/build-and-push.yml | ||
with: | ||
version: ${{ inputs.version }} | ||
docker_context: ./package-testing/sdk-test-runner | ||
image_name: sdk-test-runner | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Build and push Testing API | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version string for SDK Testing API release' | ||
required: true | ||
default: '1.0.0' | ||
|
||
push: | ||
paths: | ||
.github/workflows/release-sdk-testing-api.yml | ||
|
||
jobs: | ||
build-and-upload: | ||
uses: ./.github/workflows/build-and-push.yml | ||
with: | ||
version: ${{ inputs.version }} | ||
docker_context: ./package-testing/testing-api | ||
image_name: testing-api | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Test Packaged SDKs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test-php-sdk: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: ['linux'] | ||
uses: ./.github/workflows/test-server-sdk.yml | ||
with: | ||
platform: ${{ matrix.platform }} | ||
sdkName: 'eppo/php-sdk' | ||
sdkRelayDir: 'php-sdk-relay' | ||
secrets: inherit | ||
|
||
test-python-sdk: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: ['linux'] | ||
uses: ./.github/workflows/test-server-sdk.yml | ||
with: | ||
platform: ${{ matrix.platform }} | ||
sdkName: 'eppo/python-sdk' | ||
sdkRelayDir: 'python-sdk-relay' | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
name: Test SDKs Remotely | ||
# Triggers testing workflows in all SDK repositories except eppo-multiplatform | ||
# For eppo-multiplatform, Depndabot does the job of the remote-testing by opening a PR against the repo to update test data. | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'ufc/**' | ||
- '.github/workflows/test-sdks-remote.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -14,23 +17,23 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
matrix: | ||
sdk: | ||
- { repo: "android-sdk", workflow: "test.yaml", ref: "main" } | ||
- { repo: "dot-net-server-sdk", workflow: "run-tests.yml", ref: "main" } | ||
- { repo: "eppo-ios-sdk", workflow: "unit-tests.yml", ref: "main" } | ||
- { repo: "golang-sdk", workflow: "test.yml", ref: "main" } | ||
- { repo: "sdk-common-jdk", workflow: "lint-test-sdk.yml", ref: "main" } | ||
- { repo: "java-server-sdk", workflow: "lint-test-sdk.yml", ref: "main" } | ||
- { repo: "js-client-sdk", workflow: "lint-test-sdk.yml", ref: "main" } | ||
- { repo: "node-server-sdk", workflow: "lint-test-sdk.yml", ref: "main" } | ||
- { repo: "php-sdk", workflow: "run-tests.yml", ref: "main" } | ||
- { repo: "python-sdk", workflow: "lint-test-sdk.yml", ref: "main" } | ||
- { repo: "react-native-sdk", workflow: "ci.yml", ref: "main" } | ||
steps: | ||
- name: Display workflow details | ||
shell: bash | ||
run: | | ||
echo "Testing eppo-exp/${{ matrix.sdk.repo }}" | ||
echo "Testing eppo-exp/${{ matrix.sdk.repo }}/${{ matrix.sdk.workflow }}" | ||
- name: Run remote workflow | ||
uses: convictional/[email protected] | ||
with: | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Test Packaged Server SDKs | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
platform: | ||
description: 'Platforms to test the SDK Relay on; linux, macos, windows' | ||
type: string | ||
required: true | ||
sdkName: | ||
description: 'Name of the SDK' | ||
type: string | ||
required: true | ||
sdkRelayDir: | ||
description: 'Directory of the SDK Relay server code' | ||
type: string | ||
required: false | ||
os: | ||
description: 'Specific runner OS to use' | ||
type: string | ||
|
||
|
||
jobs: | ||
test-packaged-server-sdks: | ||
runs-on: ${{ inputs.os || inputs.platform == 'linux' && 'ubuntu-latest' || inputs.platform == 'macos' && 'macos-13' || inputs.platform == 'windows' && 'windows-latest' || 'NONE' }} | ||
|
||
env: | ||
SDK_NAME: ${{ inputs.sdkName }} | ||
SDK_DIR: ${{ inputs.sdkRelayDir }} | ||
EPPO_API_HOST: localhost | ||
SDK_RELAY_HOST: localhost | ||
TEST_RUNNER_HOST: localhost | ||
EPPO_SDK_PLATFORM: ${{ inputs.platform }} | ||
|
||
PROJECT_ID: ${{ vars.SDK_TESTING_PROJECT_ID }} | ||
REGION: ${{ vars.SDK_TESTING_REGION }} | ||
GAR_LOCATION: ${{ vars.SDK_TESTING_REGION }}-docker.pkg.dev/${{ vars.SDK_TESTING_PROJECT_ID }}/sdk-testing | ||
|
||
steps: | ||
- name: Test information header | ||
shell: bash | ||
run: echo "Running Test Cluster for ${SDK_NAME}" | ||
|
||
- name: Set some variables | ||
id: vars | ||
run: | | ||
echo "::set-output name=date::$(date +'%Y-%m-%d')" | ||
echo "SAFE_SDK_NAME=$(echo ${SDK_NAME} | sed 's/\//_/g')" >> $GITHUB_ENV | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
# Set up docker (macos runners) | ||
- id: setup-docker | ||
if: ${{ inputs.platform == 'macos' }} | ||
name: Setup Docker | ||
uses: douglascamata/setup-docker-macos-action@v1-alpha | ||
|
||
# Set up gCloud | ||
- id: "auth" | ||
uses: "google-github-actions/auth@v1" | ||
with: | ||
credentials_json: "${{ secrets.SERVICE_ACCOUNT_KEY }}" | ||
|
||
- name: "Set up Cloud SDK" | ||
uses: "google-github-actions/setup-gcloud@v1" | ||
|
||
# Allow docker access to the GAR | ||
- name: "Docker auth" | ||
run: gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet | ||
|
||
# Pull test runner and testing api images for GCP Artifact Registry (GAR) and | ||
# retag them locally as expected by the runner script. | ||
- name: Pull Test Runner image | ||
run: | | ||
docker pull ${{ env.GAR_LOCATION }}/sdk-test-runner:latest | ||
docker tag ${{ env.GAR_LOCATION }}/sdk-test-runner:latest Eppo-exp/sdk-test-runner:latest | ||
docker pull ${{ env.GAR_LOCATION }}/testing-api:latest | ||
docker tag ${{ env.GAR_LOCATION }}/testing-api:latest Eppo-exp/testing-api:latest | ||
- name: Run tests | ||
run: | | ||
pushd package-testing/sdk-test-runner | ||
./test-sdk.sh server ${SDK_NAME} | ||
popd | ||
- name: Upload Logs | ||
if: success() || failure() # always run even if the previous steps fail | ||
|
||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.date.outputs.date }}-${{ env.SAFE_SDK_NAME }}-${{ inputs.platform }}-test-logs | ||
path: package-testing/sdk-test-runner/logs/ | ||
|
||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v5 | ||
if: success() || failure() # always run even if the previous steps fail | ||
with: | ||
report_paths: 'package-testing/sdk-test-runner/logs/results.xml' |
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
Oops, something went wrong.