Skip to content

refactor: Overhaul Ansible scripts to provide separate environments (… #51

refactor: Overhaul Ansible scripts to provide separate environments (…

refactor: Overhaul Ansible scripts to provide separate environments (… #51

name: End-to-end extract and load tests
on:
push:
branches:
- "main"
paths:
- ".github/workflows/warehouses_e2e_tests.yml"
- "elt-common/**"
- "warehouses/accelerator/extract_load/opralogweb/**"
pull_request:
types: [opened, synchronize, reopened]
paths:
- ".github/workflows/warehouses_e2e_tests.yml"
- "elt-common/**"
- "warehouses/accelerator/extract_load/opralogweb/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
env:
PYTHON_VERSION: 3.13
UV_VERSION: latest
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Bring up Docker Compose services
uses: hoverkraft-tech/compose-action@v2.5.0
with:
compose-file: infra/local/docker-compose.yml
up-flags: --wait --wait-timeout 300
down-flags: --volumes --remove-orphans
- name: Add adp-router to /etc/hosts
shell: bash -l {0}
run: |
echo "127.0.0.1 adp-router" | sudo tee -a /etc/hosts
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
activate-environment: true
version: ${{ env.UV_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
- name: Install script dependencies
shell: bash -l {0}
run: |
uv sync --active --script warehouses/accelerator/extract_load/opralogweb/extract_and_load.py
- name: Install test dependencies
shell: bash -l {0}
run: |
uv pip install --group dev .
working-directory: elt-common
- name: Run tests
shell: bash -l {0}
run: |
pytest --durations-min=0.5 --exitfirst tests --cache-clear
working-directory: warehouses/accelerator/extract_load/opralogweb
- name: Remove adp-router from /etc/hosts
if: always()
shell: bash -l {0}
run: |
sudo sed -i -e '/adp-router/d' /etc/hosts