use buildx test #12
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: Test Packaged Server SDKs | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
test-packaged-server-sdks: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
sdk: | |
- { sdkName: "eppo/php-sdk", | |
sdkDir: "php-sdk-relay", | |
hostAddressFromDocker: "localhost" | |
} | |
runs-on: ubuntu-latest | |
env: | |
SDK_NAME: ${{matrix.sdk.sdkName}} | |
SDK_DIR: ${{ matrix.sdk.sdkDir }} | |
EPPO_API_HOST: ${{matrix.sdk.hostAddressFromDocker}} | |
SDK_RELAY_HOST: ${{matrix.sdk.hostAddressFromDocker}} | |
TEST_RUNNER_HOST: ${{matrix.sdk.hostAddressFromDocker}} | |
steps: | |
- name: Test information header | |
shell: bash | |
run: echo "Running Test Cluster for ${SDK_NAME}" | |
- name: Get current date | |
id: date | |
run: | | |
echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
echo "SAFE_SDK_NAME=$(echo ${SDK_NAME} | sed 's/\//_/g')" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
- name: Prepare test runner image | |
run: | | |
pushd package-testing/sdk-test-runner | |
docker build . -t Eppo-exp/sdk-test-runner:latest | |
echo "pull the latest instead" | |
popd | |
- name: Prepare testing API server image | |
run: | | |
pushd package-testing/testing-api | |
docker build . -t Eppo-exp/test-api-server:latest | |
echo "pull the latest instead" | |
popd | |
- name: Run tests | |
run: | | |
pushd package-testing/sdk-test-runner | |
./test-sdk.sh server ${SDK_NAME} | |
ls -al ./logs | |
popd | |
- name: Logs | |
if: success() || failure() # always run even if the previous steps fail | |
run: | | |
echo "List log files" | |
pushd package-testing/sdk-test-runner | |
ls logs | |
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 }}-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' | |
# - name: Test Report | |
# if: success() || failure() # always run even if the previous steps fail | |
# run: | | |
# echo "Link to the rendered test report" | |
# pushd package-testing/sdk-test-runner | |
# ls logs | |
# cat logs/test_runner.log | |
# popd |