Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c9bd56

Browse files
committed
Rename build.yml, as it doesn't build anything. Only test on Windows and MacOS in parent repo, due to limited Github hosted runner availability for forks.
1 parent 69c54cb commit 8c9bd56

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,24 @@ jobs:
2323
uses: actions/setup-python@v2
2424
with:
2525
python-version: '3.x'
26+
27+
# In general tests should be run after building a distribution, to test that distribution.
28+
# However as long as PyShp is a pure Python library, with pure Python deps (or no deps)
29+
# then it's not crucial.
30+
31+
# Prevent deployment of releases that fail any hooks (e.g. linting) or that fail any tests.
32+
- name: Run tests and hooks
33+
uses: ./.github/workflows/run_tests_and_hooks.yml
34+
2635
- name: Install dependencies
2736
run: |
2837
python -m pip install --upgrade pip
2938
pip install build
3039
- name: Build package
3140
run: python -m build
41+
3242
- name: Publish package
43+
if: github.repository == 'GeospatialPython/pyshp'
3344
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
3445
with:
3546
user: __token__

.github/workflows/build.yml renamed to .github/workflows/run_tests_and_hooks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# This workflow will run the pre-commit hooks (including linters), and the tests with a variety of Python versions
22

3-
name: build
3+
name: Run pre-commit hooks and tests
44

55
on:
66
push:
77
pull_request:
88
branches: [ master ]
9+
workflow_call:
910
workflow_dispatch:
1011

1112
jobs:
@@ -45,6 +46,7 @@ jobs:
4546

4647

4748
test_on_MacOS_and_Windows:
49+
if: github.repository == 'GeospatialPython/pyshp'
4850
strategy:
4951
fail-fast: false
5052
matrix:

0 commit comments

Comments
 (0)