test: integration testing #63
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: Pull Request workflow | |
on: | |
pull_request: | |
workflow_dispatch: | |
env: | |
PYTHON: 3.11.6 | |
concurrency: | |
group: active-private-${{ github.ref }}-pr | |
cancel-in-progress: true | |
jobs: | |
# This will cache the virtual env for the following jobs | |
setup-venv: | |
runs-on: ubuntu-latest | |
name: Set up a cached VENV | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup root poetry environment | |
uses: ./.github/actions/setup-root-poetry-environment | |
pre-commit: | |
needs: [setup-venv] | |
name: Linting and type checking | |
runs-on: ubuntu-latest | |
env: | |
ENCORD_SSH_KEY: ${{ secrets.ENCORD_SSH_KEY }} | |
SDK_TEST_REPORT: sdk-test-report.xml | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup root poetry environment | |
uses: ./.github/actions/setup-root-poetry-environment | |
- name: Run linting, type checking, and tests | |
uses: pre-commit/[email protected] | |
with: | |
extra_args: "--all-files --hook-stage=push" | |
timeout-minutes: 60 | |
- name: Run tests | |
run: | | |
export ENCORD_SSH_KEY='${{ env.ENCORD_SSH_KEY }}' | |
poetry run pytest tests --verbose --junitxml=${{ env.SDK_TEST_REPORT }} | |
- name: Upload report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: non-ml-${{ env.SDK_TEST_REPORT }} | |
path: ${{ env.SDK_TEST_REPORT }} |