diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 5d0d2f3..7e0c5de 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -4,34 +4,28 @@ on: push: branches: - main - - release + - develop pull_request: branches: - main - - release + - develop permissions: contents: read jobs: - formatting: - name: Code Formatting + code-quality: + name: Lint & Type Check runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Install uv - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - shell: bash + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true - name: Configure Git for private repos run: | @@ -41,62 +35,13 @@ jobs: run: uv sync - name: Check code formatting + if: always() run: uv run invoke format-check - linting: - name: Linting - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install uv - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - shell: bash - - - name: Configure Git for private repos - run: | - git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/" - - - name: Install dependencies - run: uv sync - - name: Check linting + if: always() run: uv run invoke lint-check - type-checking: - name: Type Checking - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install uv - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - shell: bash - - - name: Configure Git for private repos - run: | - git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/" - - - name: Install dependencies - run: uv sync - - name: Check type hints + if: always() run: uv run invoke mypy-check diff --git a/.github/workflows/sync-docs.yml b/.github/workflows/sync-docs.yml index 842a9a5..422bebb 100644 --- a/.github/workflows/sync-docs.yml +++ b/.github/workflows/sync-docs.yml @@ -13,15 +13,10 @@ jobs: - name: Checkout voxkit-desktop repository uses: actions/checkout@v4 - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Install uv - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true - name: Configure Git for private repos run: | diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml index 28f8cab..4db3fbc 100644 --- a/.github/workflows/tests-macos.yml +++ b/.github/workflows/tests-macos.yml @@ -4,9 +4,11 @@ on: push: branches: - main + - develop pull_request: branches: - main + - develop permissions: contents: read @@ -19,13 +21,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Install uv uses: astral-sh/setup-uv@v3 + with: + enable-cache: true - name: Configure Git for private repos run: | diff --git a/.github/workflows/tests-ubuntu.yml b/.github/workflows/tests-ubuntu.yml index 3e933f0..2126f5d 100644 --- a/.github/workflows/tests-ubuntu.yml +++ b/.github/workflows/tests-ubuntu.yml @@ -4,9 +4,11 @@ on: push: branches: - main + - develop pull_request: branches: - main + - develop permissions: contents: read @@ -19,11 +21,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Install Qt system dependencies run: | sudo apt-get update @@ -49,6 +46,8 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v3 + with: + enable-cache: true - name: Configure Git for private repos run: | @@ -61,13 +60,3 @@ jobs: - name: Run tests run: | xvfb-run -a uv run invoke run-tests - - - name: Run linting - run: | - uv run invoke lint-check - continue-on-error: true - - - name: Run type checking - run: | - uv run invoke mypy-check - continue-on-error: true diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml index 13d4bf8..edbe030 100644 --- a/.github/workflows/tests-windows.yml +++ b/.github/workflows/tests-windows.yml @@ -4,9 +4,11 @@ on: push: branches: - main + - develop pull_request: branches: - main + - develop permissions: contents: read @@ -19,13 +21,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python 3.11 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Install uv uses: astral-sh/setup-uv@v3 + with: + enable-cache: true - name: Configure Git for private repos run: |