Skip to content

Commit 223835e

Browse files
authored
Update build.yaml.jinja
1 parent c4732b7 commit 223835e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

project/.github/workflows/build.yaml.jinja

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,18 @@ jobs:
8080
path: dist/
8181
if: ${{ always() }}{% endraw %}
8282

83+
- name: Transform repository name
84+
shell: bash # Explicitly specify bash shell for consistency
85+
id: transform_name
86+
run: |
87+
# Get repository name, convert to lowercase, and replace '-' and spaces with '_'
88+
transformed=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]' | sed 's/[- ]/_/g')
89+
echo "transformed_name=${transformed}" >> $GITHUB_OUTPUT
90+
8391
- name: Run tests
8492
run: |
85-
poetry run pytest -c pyproject.toml --cov={{ python_package_import_name }} --cov-report=html \
86-
{% raw %}--cov-report=xml:coverage-${{ runner.os }}-${{ matrix.python-version }}.xml \
93+
{% raw %}poetry run pytest -c pyproject.toml --cov=${{ steps.transform_name.outputs.transformed_name }} --cov-report=html \
94+
--cov-report=xml:coverage-${{ runner.os }}-${{ matrix.python-version }}.xml \
8795
--junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}.xml \
8896
--benchmark-disable{% endraw %}
8997

0 commit comments

Comments
 (0)