From 4d85a149b8e98b5e1eca3f258e88d131ec20149e Mon Sep 17 00:00:00 2001 From: Georges Toth Date: Sun, 3 Nov 2024 22:52:47 +0100 Subject: [PATCH] update workflow --- .github/workflows/test_lint.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test_lint.yml b/.github/workflows/test_lint.yml index c79fb81..6a2c9eb 100644 --- a/.github/workflows/test_lint.yml +++ b/.github/workflows/test_lint.yml @@ -23,13 +23,16 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Start container + run: | + docker run -d --name openhab -p 8080:8080 -e OPENHAB_HTTP_PORT=8080 -v ${{ github.workspace }}/docker/openhab_conf:/openhab/conf "openhab/openhab:latest" + - name: Run tests run: | python3 -m pip install uv uv sync --extra test - - docker run -d --name openhab -p 8080:8080 -e OPENHAB_HTTP_PORT=8080 -v ${{ github.workspace }}/docker/openhab_conf:/openhab/conf "openhab/openhab:latest" uv run docker/test_connectivity.py + docker exec -i openhab /openhab/runtime/bin/client -v -p habopen users add admin admin administrator || true sleep 2 @@ -39,9 +42,10 @@ jobs: - name: Upload coverage data uses: actions/upload-artifact@v4 with: - name: coverage-data + name: coverage-data-${{ matrix.python-version }} path: .coverage.* - if-no-files-found: ignore + if-no-files-found: error + include-hidden-files: true coverage: @@ -59,7 +63,8 @@ jobs: - uses: actions/download-artifact@v4 with: - name: coverage-data + pattern: coverage-data-* + merge-multiple: true - name: Combine coverage & create xml report run: | @@ -80,8 +85,7 @@ jobs: with: python-version: ${{env.PYTHON_LATEST}} - - run: python -m pip install --upgrade pip wheel - - run: python -m pip install -e .[dev] - - - name: mypy - run: mypy --config-file pyproject.toml openhab + - run: | + python3 -m pip install uv + uv sync --extra dev + uv run mypy --config-file pyproject.toml openhab