Consolidate server logic and apply linting and formatting to tests (#… #291
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| Test: | |
| name: Test (${{ matrix.version }}) | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ['3.12', '3.13', '3.14'] | |
| env: | |
| TESTCONTAINER_DOCKER_NETWORK: kanae-testcontainers | |
| UV_NO_DEV: true | |
| UV_NO_DEFAULT_GROUPS: true | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Set up Python ${{ matrix.version }} | |
| id: setup-python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | |
| with: | |
| python-version: ${{ matrix.version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv sync --frozen --group test | |
| - name: Set up server configuration | |
| run: | | |
| cp config.dist.yml server/config.yml | |
| - name: Create Docker network for running Testcontainers | |
| run: sudo docker network create ${{ env.TESTCONTAINER_DOCKER_NETWORK }} | |
| - name: Run Tests | |
| run: | | |
| uv run pytest |