-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from GeospatialPython/Refactor_workflows
Refactor workflows to support testing before deployment, and testing on Windows and MacOS.
- Loading branch information
Showing
4 changed files
with
102 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: | ||
Test | ||
|
||
description: | ||
Run pytest, and run the doctest runner (shapefile.py as a script). | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# The Repo is required to already be checked out, e.g. by the calling workflow | ||
|
||
# The Python to be tested with is required to already be setup, with "python" and "pip" on the system Path | ||
|
||
- name: Doctests | ||
shell: bash | ||
run: python shapefile.py | ||
|
||
- name: Install test dependencies. | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.test.txt | ||
- name: Pytest | ||
shell: bash | ||
run: | | ||
pytest | ||
- name: Show versions for logs. | ||
shell: bash | ||
run: | | ||
python --version | ||
python -m pytest --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# This workflow will run the tests on a variety of operating systems and architectures. | ||
|
||
name: Run tests on low availability Github hosted runners | ||
|
||
on: | ||
# Optionally run only, until the availability of the required Github hosted | ||
# runners does not slow down CI. | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run_tests: | ||
if: github.repository == 'GeospatialPython/pyshp' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ | ||
"3.12", | ||
] | ||
os: [ | ||
# "macos-12", | ||
"ubuntu-24.04", | ||
# "windows-2022", | ||
] | ||
|
||
runs-on: matrix.os | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python_version }} | ||
|
||
- name: Run tests | ||
uses: ./.github/actions/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters