Skip to content

🚚 Migrate Dewrangle-related files and integration tests, replacing existing implementations #61

🚚 Migrate Dewrangle-related files and integration tests, replacing existing implementations

🚚 Migrate Dewrangle-related files and integration tests, replacing existing implementations #61

Workflow file for this run

name: βœ… CI
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
DEWRANGLE_DEV_PAT: ${{ secrets.DEWRANGLE_DEV_PAT }}
DEWRANGLE_BASE_URL: ${{ secrets.DEWRANGLE_BASE_URL }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_BUCKET_DATA_TRANSFER_TEST: ${{ secrets.AWS_BUCKET_DATA_TRANSFER_TEST }}
CAVATICA_BILLING_GROUP_ID: ${{ secrets.CAVATICA_BILLING_GROUP_ID }}
DWDS_DELETE_SAFETY_CHECK: ${{ secrets.DWDS_DELETE_SAFETY_CHECK }}
jobs:
lint:
name: 🚨 Lint code
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: πŸ“¦ Install deps
run: |
python -m pip install --upgrade pip
pip install black==24.10.0
- name: 🚨 Lint code
run: |
black --check --line-length 80 tests d3b_api_client_cli
unit-test:
name: βœ… Unit test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: πŸ“¦ Install deps
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: βœ… Test
run: |
pytest --show-capture={no,stdout,stderr} tests/unit
integration-test:
name: βœ… Integration test
runs-on: ubuntu-latest
timeout-minutes: 30
# IMPORTANT: secrets are not exposed to fork PRs
if: ${{ github.event.pull_request.head.repo.fork == false }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: 🐳 Sanity check Docker
run: |
docker version
docker info
- name: πŸ“¦ Install deps
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
d3b-clients --help
- name: βœ… Test
env:
# Ensure these are present in the test process
DEWRANGLE_DEV_PAT: ${{ secrets.DEWRANGLE_DEV_PAT }}
DEWRANGLE_BASE_URL: ${{ secrets.DEWRANGLE_BASE_URL }}
run: |
# Optional: hard-fail early with a clear message instead of confusing KeyErrors
python -c "import os; assert os.getenv('DEWRANGLE_DEV_PAT') and os.getenv('DEWRANGLE_BASE_URL'), 'Missing Dewrangle secrets'"
pytest --show-capture={no,stdout,stderr} tests/integration