E2E Tests #114
This file contains hidden or 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: E2E Tests | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| commit_sha: | |
| description: 'The hash value of the commit.' | |
| required: true | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout repo | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.commit_sha }} | |
| fetch-depth: 0 | |
| submodules: 'recursive' | |
| - name: setup python 3 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: install or update Python build system | |
| run: python3 -m pip install -U wheel setuptools certifi pip | |
| - name: install test dependencies | |
| run: make test-deps | |
| - name: generate local SSH key | |
| run: ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N "" | |
| - name: Install Python deps | |
| run: pip3 install requests wheel boto3 | |
| - name: run e2e test | |
| run: | | |
| make e2e | |
| env: | |
| CLEANUP_TEST_LINODE_INSTANCE: true | |
| LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }} | |
| - name: Upload test results | |
| if: always() | |
| run: | | |
| cp hack/*_go_metadata_test_report.xml . | |
| filename=$(ls | grep -E '^[0-9]{12}_go_metadata_test_report\.xml$') | |
| python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/add_gha_info_to_xml.py \ | |
| --branch_name "${GITHUB_REF#refs/*/}" \ | |
| --gha_run_id "$GITHUB_RUN_ID" \ | |
| --gha_run_number "$GITHUB_RUN_NUMBER" \ | |
| --xmlfile "${filename}" | |
| sync | |
| python3 e2e_scripts/tod_scripts/xml_to_obj_storage/scripts/xml_to_obj.py "${filename}" | |
| env: | |
| LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }} | |
| LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }} |