Skip to content

Commit

Permalink
Account for the different behaviour of echo on Windows and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Finnie committed Aug 5, 2024
1 parent 7697464 commit 3995597
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/distribute_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,23 @@ jobs:
- name: Install cibuildwheel
run: python -m pip install cibuildwheel>=2.19.2

# Need to duplicate these two lines as it seems Windows and Linux echo treats qutotes differently
- name: Build and test the wheels
if: matrix.os == 'ubuntu-latest'
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.platform_id }}*
CIBW_TEST_COMMAND: python -W default -m unittest discover --start-directory {project}/tests
# setuptools_scm workaround for https://github.com/pypa/setuptools_scm/issues/455
CIBW_BEFORE_BUILD: ${{ github.ref == 'refs/heads/dev' && 'echo ''local_scheme = "no-local-version"'' >> pyproject.toml && git diff --color=always && git update-index --assume-unchanged pyproject.toml' || '' }}
- name: Build and test the wheels
if: matrix.os == 'windows-latest'
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.platform_id }}*
CIBW_TEST_COMMAND: python -W default -m unittest discover --start-directory {project}/tests
# setuptools_scm workaround for https://github.com/pypa/setuptools_scm/issues/455
CIBW_BEFORE_BUILD: ${{ github.ref == 'refs/heads/dev' && 'echo local_scheme = "no-local-version" >> pyproject.toml && git diff --color=always && git update-index --assume-unchanged pyproject.toml' || '' }}

# Upload the results
- uses: actions/upload-artifact@v4
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ jobs:
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: Install coverage
run: |
python -m pip install codecov
- name: install PyGOM
run: |
pip install .
- name: Run tests
run: python -m unittest discover --verbose --start-directory tests
run: coverage run -m unittest discover --verbose --start-directory tests

#TODO: Could also do something about coverage here too

0 comments on commit 3995597

Please sign in to comment.