Skip to content

Commit

Permalink
Fix auto tag build step skipped (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
katybaulch authored Apr 2, 2024
1 parent 9e013a6 commit 495677c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ jobs:
run: make test

build:
if: ${{ success() && ! startsWith(github.ref, 'refs/tags') }}
if: |
always() &&
(needs.code-quality.result == 'success' && needs.test.result == 'success') &&
! startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs:
- code-quality
Expand Down Expand Up @@ -107,7 +110,13 @@ jobs:
fi
manual-semver:
if: ${{ startsWith(github.ref, 'refs/tags') }}
if: |
always() &&
(needs.code-quality.result == 'success' && needs.test.result == 'success') &&
startsWith(github.ref, 'refs/tags')
needs:
- code-quality
- test
uses: climatepolicyradar/reusable-workflows/.github/workflows/semver.yml@v3
secrets: inherit
with:
Expand Down
11 changes: 7 additions & 4 deletions .trunk/configure-pyright-with-pyenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ venv_name=$(grep -m 1 venv pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" |
# Check if pyrightconfig already exists.
if [[ ! -f pyrightconfig.json ]]; then
# Check if pyenv-pyright plugin is installed
if ! command -v pyenv 1>/dev/null; then
if ! command -v pyenv &>/dev/null; then
echo "pyenv not installed. Please install pyenv..."
exit 1
fi

pyenv_root=$(pyenv root)
dir_exists=$(ls -A "${pyenv_root}"/plugins/pyenv-pyright)
if [[ -z ${dir_exists} ]]; then
git clone https://github.com/alefpereira/pyenv-pyright.git "${pyenv_root}"/plugins/pyenv-pyright
dir_path="${pyenv_root}"/plugins/pyenv-pyright
if [[ ! -d ${dir_path} ]]; then
# trunk-ignore(shellcheck/SC2312)
if [[ -n $(ls -A "${dir_path}") ]]; then
git clone https://github.com/alefpereira/pyenv-pyright.git "${dir_path}"
fi
fi

# Generate the pyrightconfig.json file.
Expand Down

0 comments on commit 495677c

Please sign in to comment.