Add simple loadtest workflows using the staging cluster #77
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: Basic e2e tests | |
on: pull_request | |
jobs: | |
e2e_quick: | |
runs-on: ${{ contains(github.event.pull_request.labels.*.name, '4.1') && 'ghrunner-loadtest-4.1' || contains(github.event.pull_request.labels.*.name, '4.0') && 'ghrunner-loadtest-4.0' || 'ghrunner-loadtest-4.0' }} | |
env: | |
CONDA_ENV_PATH: /home/runner/_prep/anaconda/envs/workflows/bin | |
steps: | |
- name: Checkout hopsworks-api SDK | |
uses: actions/checkout@v4 | |
with: | |
path: hopsworks-api | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Checkout loadtest project | |
uses: actions/checkout@v4 | |
with: | |
repository: 'vatj/loadtest' | |
ref: 'draft-e2e-script-staging' | |
token: ${{ secrets.PAT_LOADTEST }} | |
path: loadtest | |
- name: Install latest client SDK | |
run: | | |
cd hopsworks-api | |
export GITHUB_SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA") | |
echo "GITHUB_SHORT_SHA=$GITHUB_SHORT_SHA" >> $GITHUB_ENV | |
echo "sha: $GITHUB_SHORT_SHA" | |
cp README.md ./python/ | |
$CONDA_ENV_PATH/pip uninstall -y hopsworks | |
$CONDA_ENV_PATH/pip install "./python[python,polars,great-expectations]" --upgrade-strategy eager | |
$CONDA_ENV_PATH/pip install rich | |
pip freeze | |
- name: Setup project | |
env: | |
HOPSWORKS_DOMAIN: hopsworks.glassfish.service.consul | |
HOPSWORKS_PORT: 8182 | |
FIXTURES_PATH: /tmp/fixtures.json | |
run: | | |
cd ${{github.workspace}}/loadtest | |
HELPERS_PATH=${{github.workspace}}/loadtest/tests | |
export PYTHONPATH=$HELPERS_PATH:$PYTHONPATH | |
echo "Setting up project" | |
echo "HOPSWORKS_DOMAIN=$HOPSWORKS_DOMAIN" | |
$CONDA_ENV_PATH/python tests/setup_project.py | |
- name: Runs only e2e tests suite for commit ${{ env.GITHUB_SHORT_SHA }} | |
env: | |
MARKER: python_quick_e2e | |
FIXTURES_PATH: /tmp/fixtures.json | |
USE_LOADTEST_API_KEY_FIXTURE: true | |
HOPSWORKS_DOMAIN: hopsworks.glassfish.service.consul | |
HOPSWORKS_PORT: 8182 | |
PARALLEL_TESTS: 3 | |
run: | | |
echo "Running e2e tests with clusterFirstWithHostNet" | |
HELPERS_PATH=${{github.workspace}}/loadtest/tests | |
export PYTHONPATH=$HELPERS_PATH:$PYTHONPATH | |
cd ${{github.workspace}}/loadtest/tests | |
./run_e2e_on_runner.sh $MARKER |