Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows test PyPI install #9

Merged
merged 14 commits into from
Aug 21, 2024
17 changes: 15 additions & 2 deletions .github/workflows/install-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,23 @@ jobs:
if: matrix.os != 'windows-latest'
run: |
if grep -q "WARN" stderr.txt; then echo "Warnings in pip install output" && cat stderr.txt && exit 1; else exit 0; fi
- name: Get version
- name: Get version non-windows
if: matrix.os != 'windows-latest'
run: |
INSTALLED_VERSION=`python -c 'import openscm_zenodo; print(f"v{openscm_zenodo.__version__}")'`
echo $INSTALLED_VERSION
echo "INSTALLED_VERSION=$INSTALLED_VERSION" >> $GITHUB_ENV
- name: Get version windows
if: matrix.os == 'windows-latest'
run: |
chcp 65001 # use utf-8
python -c 'import openscm_zenodo; f = open("version.txt", "w"); f.write(f"INSTALLED_VERSION=v{openscm_zenodo.__version__}"); f.close()'
echo "Showing version.txt"
type version.txt
type version.txt >> $env:GITHUB_ENV
- name: Check installed version environment variable
run: |
echo "${{ env.INSTALLED_VERSION }}"
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand All @@ -58,4 +70,5 @@ jobs:
pip install pytest
- name: Run tests
run: |
pytest tests -r a -vv -s
# Can't run doctests here because the paths are different
pytest tests -r a -vv tests
1 change: 1 addition & 0 deletions changelog/9.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed Windows test CI install and the release notes generation script.
4 changes: 2 additions & 2 deletions scripts/changelog-to-release-template.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ def main() -> None:
continue

if not grab_notes:
if line.startswith("## openscm-zenodo"):
if line.startswith("## OpenSCM-Zenodo"):
grab_notes = True

continue

# We are grabbing notes now
# If we've reached the next version's notes, break
if line.startswith("## openscm-zenodo"):
if line.startswith("## OpenSCM-Zenodo"):
break

latest_version_notes.append(line)
Expand Down
Loading