refactor: create geos-pv package #256
Workflow file for this run
This file contains hidden or 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
name: geosPythonPackages CI | |
on: pull_request | |
# Cancels in-progress workflows for a PR when updated | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Checks if PR title follows conventional semantics | |
semantic_pull_request: | |
permissions: | |
pull-requests: write # for amannn/action-semantic-pull-request to analyze PRs and | |
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if the PR name has conventional semantics | |
if: github.event_name == 'pull_request' | |
uses: amannn/action-semantic-pull-request@v5.5.3 | |
id: lint_pr_title | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
wip: true | |
# Configure that a scope doesn't need to be provided. | |
requireScope: false | |
- name: Skip the check on main branch | |
if: github.ref_name == 'main' | |
run: | | |
echo "This is not a Pull-Request, skipping" | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
max-parallel: 3 | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
package-name: ["geos-ats", "geos-mesh", "geos-posp", "geos-timehistory", "geos-trame", "geos-utils", "geos-xml-tools", "geos-xml-viewer", "hdf5-wrapper", "pygeos-tools"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: mpi4py/setup-mpi@v1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install package | |
# working-directory: ./${{ matrix.package-name }} | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest yapf toml | |
python -m pip install ./${{ matrix.package-name }}/[test] | |
- name: Lint with yapf | |
# working-directory: ./${{ matrix.package-name }} | |
run: | | |
yapf -r --diff ./${{ matrix.package-name }} --style .style.yapf | |
- name: Test with pytest | |
#working-directory: ./${{ matrix.package-name }} | |
run: | |
# python -m pytest ./${{ matrix.package-name }} --doctest-modules --junitxml=junit/test-results.xml --cov-report=xml --cov-report=html | | |
# wrap pytest to avoid error when no tests in the package | |
sh -c 'python -m pytest ./${{ matrix.package-name }}; ret=$?; [ $ret = 5 ] && exit 0 || exit $ret' | |