From ff37b10c6068bb1800fc8eedfca2b7f5ec1ec7c6 Mon Sep 17 00:00:00 2001 From: Leonid Kuligin Date: Sat, 17 Feb 2024 12:58:53 +0100 Subject: [PATCH] fixed spellcheck --- .../workflows/{codespell.yml => _codespell.yml} | 15 +++++++++------ .github/workflows/check_diffs.yml | 12 ++++++++++-- 2 files changed, 19 insertions(+), 8 deletions(-) rename .github/workflows/{codespell.yml => _codespell.yml} (67%) diff --git a/.github/workflows/codespell.yml b/.github/workflows/_codespell.yml similarity index 67% rename from .github/workflows/codespell.yml rename to .github/workflows/_codespell.yml index d9df1695..fc81ef7a 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/_codespell.yml @@ -1,11 +1,13 @@ --- -name: CI / cd . / make spell_check +name: make spell_check on: - push: - branches: [main] - pull_request: - branches: [main] + workflow_call: + inputs: + working-directory: + required: true + type: string + description: "From which folder this pipeline executes" permissions: contents: read @@ -24,9 +26,10 @@ jobs: pip install toml - name: Extract Ignore Words List + working-directory: ${{ inputs.working-directory }} run: | # Use a Python script to extract the ignore words list from pyproject.toml - python .github/workflows/extract_ignored_words_list.py + python ../../.github/workflows/extract_ignored_words_list.py id: extract_ignore_words - name: Codespell diff --git a/.github/workflows/check_diffs.yml b/.github/workflows/check_diffs.yml index c769d081..049b993a 100644 --- a/.github/workflows/check_diffs.yml +++ b/.github/workflows/check_diffs.yml @@ -31,6 +31,16 @@ jobs: python .github/scripts/check_diff.py ${{ steps.files.outputs.all }} >> $GITHUB_OUTPUT outputs: dirs-to-run: ${{ steps.set-matrix.outputs.dirs-to-run }} + codespell: + name: cd ${{ matrix.working-directory }} + needs: [build] + strategy: + matrix: + working-directory: ${{ fromJson(needs.build.outputs.dirs-to-run) }} + uses: ./.github/workflows/_codespell.yml + with: + working-directory: ${{ matrix.working-directory }} + ci: name: cd ${{ matrix.working-directory }} needs: [ build ] @@ -40,5 +50,3 @@ jobs: uses: ./.github/workflows/_all_ci.yml with: working-directory: ${{ matrix.working-directory }} - -