Skip to content

fix some tests failing on local dev env due to this config being set via env #2259

fix some tests failing on local dev env due to this config being set via env

fix some tests failing on local dev env due to this config being set via env #2259

Workflow file for this run

name: Run Executor QA
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
env:
PYTHON_DEFAULT_VERSION: "3.11"
jobs:
linter:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./executor
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
cache: "pip"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
enable-cache: true
- name: Install dependencies
run: python -m pip install --upgrade nox
- name: Create dotenv file
run: cp ./envs/dev/.env.template .env
- name: Run linters
run: nox -vs lint
type_check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./executor
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
cache: "pip"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
enable-cache: true
- name: Install dependencies
run: python -m pip install --upgrade nox
- name: Create dotenv file
run: cp ./envs/dev/.env.template .env
- name: Run mypy
run: nox -vs type_check
test:
timeout-minutes: 10
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./executor
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
cache: "pip"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
enable-cache: true
- name: Install dependencies
run: python -m pip install --upgrade nox
- name: Prepare environment
run: ./setup-dev.sh
- name: Build backenddevelopersltd/compute-horde-job-echo:v0-latest image
run: docker build . -t backenddevelopersltd/compute-horde-job-echo:v0-latest
working-directory: ./executor/app/src/compute_horde_executor/executor/tests/integration/docker_image_for_tests
- name: Build backenddevelopersltd/compute-horde-streaming-job-test:v0-latest image
run: docker build . -t backenddevelopersltd/compute-horde-streaming-job-test:v0-latest
working-directory: ./executor/app/src/compute_horde_executor/executor/tests/integration/docker_image_for_streaming_job_tests
- name: Run unit tests
run: nox -vs test
- name: Executor Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: "Executor test report"
files: "executor/app/src/test-report.xml"
fail_on: "nothing"
comment_mode: "failures"
check_run: true