Mod updates owner #1
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| lint-and-unit: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: | | |
| requirements.txt | |
| requirements-dev.txt | |
| setup.py | |
| pyproject.toml | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-dev.txt | |
| pip install -e . | |
| - name: Ruff | |
| run: ruff check . | |
| - name: Unit tests | |
| run: pytest -q | |
| integration: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-unit | |
| services: | |
| core: | |
| image: datarhei/core:latest | |
| ports: | |
| - 8080:8080 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| cache-dependency-path: | | |
| requirements.txt | |
| requirements-dev.txt | |
| setup.py | |
| pyproject.toml | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-dev.txt | |
| pip install -e . | |
| - name: Wait for Core | |
| run: | | |
| for i in {1..60}; do | |
| if curl -fsS http://127.0.0.1:8080/api > /dev/null; then | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| echo "Core service not ready in time" | |
| exit 1 | |
| - name: Integration tests (no cluster) | |
| env: | |
| RUN_INTEGRATION_TESTS: "1" | |
| CORE_URL: "http://127.0.0.1:8080" | |
| run: pytest -q tests |