Skip to content

Commit ec052aa

Browse files
committed
Run tests action only on relevant updates
1 parent 1132986 commit ec052aa

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: Deploy to PyPI
42

53
# Controls when the workflow will run
64
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
5+
# Triggers the workflow on new releases
86
release:
97
types: [published]
108

119
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1210
jobs:
13-
# This workflow contains a single job called "build"
11+
# This workflow contains a single job called "deploy"
1412
deploy:
1513
# The type of runner that the job will run on
1614
runs-on: ubuntu-latest
@@ -21,16 +19,12 @@ jobs:
2119
- uses: actions/checkout@v2
2220

2321
- name: PyPI Deployment
24-
# You may pin to the exact commit or the version.
25-
# uses: casperdcl/deploy-pypi@bb869aafd89f657ceaafe9561d3b5584766c0f95
2622
uses: casperdcl/deploy-pypi@v2
2723
with:
2824
# PyPI username
2925
user: ${{ secrets.PYPI_USER }}
3026
# PyPI password or API token
3127
password: ${{ secrets.TEST_PYPI_PASS }}
32-
# Build requirements
33-
# requirements: # optional, default is twine wheel
3428
# `setup.py` command to run ("true" is a shortcut for "clean sdist -d <dist_dir> bdist_wheel -d <dist_dir>")
3529
build: clean sdist -d dist/
3630
# `pip` command to run ("true" is a shortcut for "wheel -w <dist_dir> --no-deps .")

.github/workflows/tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# This is a basic workflow to help you get started with Actions
2-
31
name: Run tests
42

53
# Controls when the workflow will run
64
on:
75
# Triggers the workflow on push or pull request events but only for the master branch
86
push:
7+
# Only run if source code or test configurations are changed
8+
paths:
9+
- "dpath/"
10+
- "**.py"
11+
- "tox.ini"
912
pull_request:
1013

1114
# Allows you to run this workflow manually from the Actions tab
@@ -34,8 +37,6 @@ jobs:
3437
with:
3538
python-version: ${{ matrix.python-version }}
3639

37-
# Instead of installing and running tox and tox-gh-actions,
38-
# you can simply use this composite run steps action.
3940
- name: Run tox with tox-gh-actions
4041
uses: ymyzk/run-tox-gh-actions@main
4142
with:

0 commit comments

Comments
 (0)