Team Ai
Apppublic

Underground-Digital/Workflow-Engine

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
api-tests.yml80 linesDownload Raw Back to workflows
1name: Run Pytest2 3on:4  pull_request:5    branches:6      - main7    paths:8      - api/**9      - docker/**10      - .github/workflows/api-tests.yml11 12concurrency:13  group: api-tests-${{ github.head_ref || github.run_id }}14  cancel-in-progress: true15 16jobs:17  test:18    name: API Tests19    runs-on: ubuntu-latest20    strategy:21      matrix:22        python-version:23          - "3.10"24          - "3.11"25          - "3.12"26 27    steps:28      - name: Checkout code29        uses: actions/checkout@v430 31      - name: Install Poetry32        uses: abatilo/actions-poetry@v333 34      - name: Set up Python ${{ matrix.python-version }}35        uses: actions/setup-python@v536        with:37          python-version: ${{ matrix.python-version }}38          cache: poetry39          cache-dependency-path: api/poetry.lock40 41      - name: Check Poetry lockfile42        run: |43          poetry check -C api --lock44          poetry show -C api45 46      - name: Install dependencies47        run: poetry install -C api --with dev48 49      - name: Check dependencies in pyproject.toml50        run: poetry run -C api bash dev/pytest/pytest_artifacts.sh51 52      - name: Run Unit tests53        run: poetry run -C api bash dev/pytest/pytest_unit_tests.sh54 55      - name: Run ModelRuntime56        run: poetry run -C api bash dev/pytest/pytest_model_runtime.sh57 58      - name: Run Tool59        run: poetry run -C api bash dev/pytest/pytest_tools.sh60 61      - name: Set up dotenvs62        run: |63          cp docker/.env.example docker/.env64          cp docker/middleware.env.example docker/middleware.env65 66      - name: Expose Service Ports67        run: sh .github/workflows/expose_service_ports.sh68 69      - name: Set up Sandbox70        uses: hoverkraft-tech/compose-action@v2.0.271        with:72          compose-file: |73            docker/docker-compose.middleware.yaml74          services: |75            sandbox76            ssrf_proxy77 78      - name: Run Workflow79        run: poetry run -C api bash dev/pytest/pytest_workflow.sh80