File tree Expand file tree Collapse file tree
actions/run-pytest-with-uv Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 compose-file-path :
66 description : If supplied, brings up the services defined in the given docker compose file.
77 default : " "
8- pyproject-directory :
9- description : Path to the directory containing pyproject.toml
10- required : true
8+ install-cmd :
9+ description : The uv command to install the project
10+ default : " uv sync --locked --all-extras --dev "
1111 pytest-file-or-dir :
1212 description : Path to a file or directory for pytest execution
1313 required : true
@@ -19,6 +19,9 @@ inputs:
1919 uv-version :
2020 description : The version of uv to install e.g., `0.5.0` Defaults to the version in pyproject.toml or 'latest'.
2121 default : " latest"
22+ working-directory :
23+ description : Working directory while running pytest
24+ required : true
2225
2326runs :
2427 using : composite
@@ -41,13 +44,13 @@ runs:
4144
4245 - name : Install the project
4346 shell : bash -l {0}
44- run : uv sync --locked --all-extras --dev
45- working-directory : ${{ inputs.pyproject -directory }}
47+ run : ${{ inputs.install-cmd }}
48+ working-directory : ${{ inputs.working -directory }}
4649
4750 - name : Run tests
4851 shell : bash -l {0}
4952 run : uv run pytest --durations-min=0.5 --exitfirst "${{ inputs.pytest-file-or-dir }}" --cache-clear
50- working-directory : ${{ inputs.pyproject -directory }}
53+ working-directory : ${{ inputs.working -directory }}
5154
5255 - name : Dump Docker Compose logs on failure
5356 if : failure() && inputs.compose-file-path != ''
Original file line number Diff line number Diff line change 4141 uses : ./.github/actions/run-pytest-with-uv
4242 with :
4343 compose-file-path : infra/local/docker-compose.yml
44- pyproject-directory : elt-common
4544 pytest-file-or-dir : tests/e2e_tests
4645 uv-cache-dependency-glob : elt-common/pyproject.toml
46+ working-directory : elt-common
4747
4848 - name : Remove adp-router from /etc/hosts
4949 shell : bash -l {0}
Original file line number Diff line number Diff line change 2828 - name : Run unit tests
2929 uses : ./.github/actions/run-pytest-with-uv
3030 with :
31- pyproject-directory : elt-common
3231 pytest-file-or-dir : tests/unit_tests
3332 uv-cache-dependency-glob : elt-common/pyproject.toml
33+ working-directory : elt-common
Original file line number Diff line number Diff line change 1+ name : End-to-end tests for extract and load scripts in the warehouse
2+ on :
3+ push :
4+ branches :
5+ - " main"
6+ paths :
7+ - " .github/workflows/warehouses_e2e_tests.yml"
8+ - " elt-common/**"
9+ - " warehouses/accelerator/extract_load/opralogweb/**"
10+ pull_request :
11+ types : [opened, synchronize, reopened]
12+ paths :
13+ - " .github/workflows/warehouses_e2e_tests.yml"
14+ - " elt-common/**"
15+ - " warehouses/accelerator/extract_load/opralogweb/**"
16+
17+ concurrency :
18+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
19+ cancel-in-progress : true
20+
21+ jobs :
22+ test :
23+ name : warehouses end-to-end tests
24+ runs-on : ubuntu-latest
25+
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v6
29+
30+ - name : Add adp-router to /etc/hosts
31+ shell : bash -l {0}
32+ run : |
33+ echo "127.0.0.1 adp-router" | sudo tee -a /etc/hosts
34+
35+ - name : Run end-to-end tests
36+ uses : ./.github/actions/run-pytest-with-uv
37+ with :
38+ compose-file-path : infra/local/docker-compose.yml
39+ install-cmd : uv sync --locked --dev --script extract_and_load.py
40+ pytest-file-or-dir : tests
41+ uv-cache-dependency-glob : elt-common/pyproject.toml
42+ working-directory : warehouses/accelerator/extract_load/opralogweb
43+
44+ - name : Remove adp-router from /etc/hosts
45+ shell : bash -l {0}
46+ run : |
47+ sudo sed -i -e '/adp-router/d' /etc/hosts
You can’t perform that action at this time.
0 commit comments