Skip to content

Commit 6a357e3

Browse files
committed
ci update
1 parent 269fb2e commit 6a357e3

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [master, dev]
66
pull_request_target:
7-
branches: [master]
7+
branches: [master, dev]
88

99
jobs:
1010
test:
@@ -58,6 +58,7 @@ jobs:
5858

5959
report:
6060
name: Report Coverage
61+
if: github.ref == 'refs/heads/master'
6162
runs-on: ubuntu-latest
6263
needs: test
6364
steps:
@@ -77,3 +78,22 @@ jobs:
7778
token: ${{ secrets.CODECOV_TOKEN }}
7879
directory: ./coverage-artifacts/
7980
fail_ci_if_error: false
81+
82+
check-version:
83+
name: Check for accidental version bump
84+
if: github.base_ref == 'dev'
85+
runs-on: ubuntu-latest
86+
steps:
87+
- name: Checkout repository
88+
uses: actions/checkout@v4
89+
with:
90+
fetch-depth: 0
91+
92+
- name: Verify that version was not bumped
93+
run: |
94+
if ! git diff --quiet origin/dev HEAD -- pyproject.toml; then
95+
echo "::error::Version in pyproject.toml was changed in a PR to dev."
96+
echo "Version bumping should only happen in a release PR to master."
97+
exit 1
98+
fi
99+
echo "Version check passed for pyproject.toml"

0 commit comments

Comments
 (0)