diff --git a/.github/workflows/checks-mise.yaml b/.github/workflows/checks-mise.yaml new file mode 100644 index 0000000..060c6fd --- /dev/null +++ b/.github/workflows/checks-mise.yaml @@ -0,0 +1,67 @@ +name: Checks - mise tools +on: + workflow_call: + workflow_dispatch: +permissions: + contents: read + +jobs: + # Every check that needs only the tools mise installs + checks: + name: Run checks + runs-on: ubuntu-24.04 + timeout-minutes: 15 + + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Restore tools + uses: ./.github/actions/mise-project-setup + with: + directory: . + + - parallel: + - name: check:prettier + + run: mise run check:prettier + shell: bash + + - name: check:pyright-repo + + run: mise run check:pyright-repo + shell: bash + + - name: check:ruff + + env: + RUFF_CACHE_DIR: ${{ runner.temp }}/ruff-cache-check + run: mise run check:ruff + shell: bash + + - name: check:ruff:format + + env: + RUFF_CACHE_DIR: ${{ runner.temp }}/ruff-cache-format + run: mise run check:ruff:format + shell: bash + + - name: check:shellcheck + + run: mise run check:shellcheck + shell: bash + + - name: check:shellcheck-config-enabled-optional-checks + + run: mise run check:shellcheck-config-enabled-optional-checks + shell: bash + + - name: check:shellcheck-gha + + run: mise run check:shellcheck-gha + shell: bash + + - name: check:shfmt + + run: mise run check:shfmt + shell: bash diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 98af7cd..6a5059b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -73,62 +73,10 @@ jobs: concurrency: group: ${{ github.workflow }}-${{ github.ref }}-homebrew-ubuntu - # Checks for root - check-prettier: + # Checks + checks-mise: needs: mise-cache-ubuntu - uses: ./.github/workflows/mise-task.yaml - with: - directory: . - task: check:prettier - - check-pyright-repo: - needs: mise-cache-ubuntu - uses: ./.github/workflows/mise-task.yaml - with: - directory: . - task: check:pyright-repo - - check-ruff: - needs: mise-cache-ubuntu - uses: ./.github/workflows/mise-task.yaml - with: - directory: . - task: check:ruff - - check-ruff-format: - needs: mise-cache-ubuntu - uses: ./.github/workflows/mise-task.yaml - with: - directory: . - task: check:ruff:format - - check-shellcheck: - needs: mise-cache-ubuntu - uses: ./.github/workflows/mise-task.yaml - with: - directory: . - task: check:shellcheck - - check-shellcheck-config-enabled-optional-checks: - needs: mise-cache-ubuntu - uses: ./.github/workflows/mise-task.yaml - with: - directory: . - task: check:shellcheck-config-enabled-optional-checks - - check-shellcheck-gha: - needs: mise-cache-ubuntu - uses: ./.github/workflows/mise-task.yaml - with: - directory: . - task: check:shellcheck-gha - - check-shfmt: - needs: mise-cache-ubuntu - uses: ./.github/workflows/mise-task.yaml - with: - directory: . - task: check:shfmt + uses: ./.github/workflows/checks-mise.yaml # CI workflows for projects in the repository ci-aoc-main: @@ -178,14 +126,7 @@ jobs: check: if: always() needs: - - check-prettier - - check-pyright-repo - - check-ruff - - check-ruff-format - - check-shellcheck - - check-shellcheck-config-enabled-optional-checks - - check-shellcheck-gha - - check-shfmt + - checks-mise - ci-aoc-main - ci-solvers-cpp - ci-solvers-python