From 69a720d7c5ff4700f198135a2a737bd7e1198d35 Mon Sep 17 00:00:00 2001 From: hmasdev Date: Thu, 4 Apr 2024 21:51:36 +0900 Subject: [PATCH] Refactor code style and static type check workflows --- .github/workflows/code-style-check-workflow-call.yaml | 3 ++- .github/workflows/static-type-check-workflow-call.yaml | 3 ++- .github/workflows/validate-version-workflow-call.yaml | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code-style-check-workflow-call.yaml b/.github/workflows/code-style-check-workflow-call.yaml index af9a29a..12af94a 100644 --- a/.github/workflows/code-style-check-workflow-call.yaml +++ b/.github/workflows/code-style-check-workflow-call.yaml @@ -28,4 +28,5 @@ jobs: python -m pip install -e .[dev] - name: Code Style Check run: | - flake8 pyjpboatrace tests --show-source + flake8 pyjpboatrace --show-source + flake8 tests --show-source diff --git a/.github/workflows/static-type-check-workflow-call.yaml b/.github/workflows/static-type-check-workflow-call.yaml index 21140c4..75a3527 100644 --- a/.github/workflows/static-type-check-workflow-call.yaml +++ b/.github/workflows/static-type-check-workflow-call.yaml @@ -28,4 +28,5 @@ jobs: python -m pip install -e .[dev] - name: Static Type Check run: | - mypy pyjpboatrace tests + mypy pyjpboatrace + mypy tests diff --git a/.github/workflows/validate-version-workflow-call.yaml b/.github/workflows/validate-version-workflow-call.yaml index d012769..15fb728 100644 --- a/.github/workflows/validate-version-workflow-call.yaml +++ b/.github/workflows/validate-version-workflow-call.yaml @@ -31,5 +31,6 @@ jobs: - name: Check Version run: | # Check if the tag is the same as pyjpboatrace.__version__ - tag=$(git describe --tags --abbrev=0) - python -c "import os; import pyjpboatrace; assert pyjpboatrace.__version__ == os.getenv('tag')" + export tag=$(echo "${{ inputs.git-ref }}" | cut -d / -f 3) + echo "extracted tag from git-ref: $tag" + python -c "import os; import pyjpboatrace; assert pyjpboatrace.__version__ == os.getenv('tag'), (pyjpboatrace.__version__, os.getenv('tag'))"