fix: update YouTube video links #138
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, feat/*] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check-version-sync: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check version sync | |
| run: ./scripts/check-version-sync.sh | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run linting | |
| run: uv run ruff check src tests | |
| test-unit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run unit tests | |
| run: uv run pytest -v --tb=short -n auto tests/unit | |
| test-integration: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Cache nf-core test data | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/vcf-pg-loader-tests | |
| key: nf-core-test-data-v1-${{ hashFiles('scripts/setup_test_data.sh') }} | |
| restore-keys: | | |
| nf-core-test-data-v1- | |
| - name: Download nf-core test VCFs | |
| run: ./scripts/setup_test_data.sh download | |
| - name: Install bcftools | |
| run: sudo apt-get update && sudo apt-get install -y bcftools | |
| - name: Run integration tests | |
| run: uv run pytest -v --tb=short -n auto tests/integration | |
| env: | |
| TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_db | |
| test-e2e: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Cache nf-core test data | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/vcf-pg-loader-tests | |
| key: nf-core-test-data-v1-${{ hashFiles('scripts/setup_test_data.sh') }} | |
| restore-keys: | | |
| nf-core-test-data-v1- | |
| - name: Download nf-core test VCFs | |
| run: ./scripts/setup_test_data.sh download | |
| - name: Install bcftools | |
| run: sudo apt-get update && sudo apt-get install -y bcftools | |
| - name: Run e2e tests | |
| run: uv run pytest -v --tb=short -n auto tests/test_*.py | |
| env: | |
| TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_db | |
| test-slow: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Cache nf-core test data | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/vcf-pg-loader-tests | |
| key: nf-core-test-data-v1-${{ hashFiles('scripts/setup_test_data.sh') }} | |
| restore-keys: | | |
| nf-core-test-data-v1- | |
| - name: Download nf-core test VCFs | |
| run: ./scripts/setup_test_data.sh download | |
| - name: Install bcftools | |
| run: sudo apt-get update && sudo apt-get install -y bcftools | |
| - name: Run slow tests | |
| run: uv run pytest -v --tb=short -n auto -m "slow" | |
| env: | |
| TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_db | |
| giab-benchmark: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: test_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Install bcftools | |
| run: sudo apt-get update && sudo apt-get install -y bcftools | |
| - name: Cache GIAB benchmark data | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/vcf-pg-loader-tests/giab | |
| key: giab-benchmark-data-v1 | |
| restore-keys: | | |
| giab-benchmark-data- | |
| - name: Download GIAB chr21 benchmark data | |
| run: ./scripts/setup_test_data.sh download-giab | |
| - name: Run GIAB benchmark tests | |
| run: uv run pytest -v --tb=short -m "giab and not giab_full" -s | |
| env: | |
| TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_db | |
| - name: Print benchmark results | |
| if: always() | |
| run: | | |
| echo "=== GIAB Benchmark Complete ===" | |
| echo "Tests validate parsing accuracy and throughput against real GIAB data" | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: [check-version-sync, lint, test-unit, test-integration, test-e2e] | |
| if: always() | |
| steps: | |
| - name: Check results | |
| run: | | |
| # check-version-sync only runs on PRs, so skip/success are both OK | |
| if [[ "${{ needs.check-version-sync.result }}" == "failure" ]]; then | |
| echo "Version sync check failed" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.lint.result }}" != "success" ]] || \ | |
| [[ "${{ needs.test-unit.result }}" != "success" ]] || \ | |
| [[ "${{ needs.test-integration.result }}" != "success" ]] || \ | |
| [[ "${{ needs.test-e2e.result }}" != "success" ]]; then | |
| exit 1 | |
| fi |