Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run test only if labels don't contain 'documentation' #2227

Merged
merged 31 commits into from
Oct 31, 2023
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1f7346b
run test only if labels don't contain 'documentation'
nbiederbeck Jan 19, 2023
ceac897
Trying variation of the conditional
Tobychev Sep 27, 2023
ea6ca33
Trying new magic conditional, see if this works as intended.
Tobychev Oct 5, 2023
c304b89
Trying new magic conditional, see if this works as intended.
Tobychev Oct 5, 2023
f346ea6
Trying new magic conditional, see if this works as intended.
Tobychev Oct 5, 2023
1450eb8
More tests of how to formulate conditional
Tobychev Oct 5, 2023
22e74d4
Think I understand the problem now
Tobychev Oct 5, 2023
09e0178
Update nitpicking ignores
Tobychev Oct 5, 2023
902a691
Fixing syntax errors
Tobychev Oct 5, 2023
36c46a6
Messing about with syntax
Tobychev Oct 5, 2023
3ba8e3e
Fix conflict with main
Tobychev Oct 5, 2023
0ec7907
Merge branch 'main' into no-run-pytest-if-documentation-label
Tobychev Oct 5, 2023
1ab4c43
Adding skip to more stages
Tobychev Oct 5, 2023
8bbd437
run test only if labels don't contain 'documentation'
nbiederbeck Jan 19, 2023
abbdac2
Trying variation of the conditional
Tobychev Sep 27, 2023
dabc4c9
Trying new magic conditional, see if this works as intended.
Tobychev Oct 5, 2023
1209083
Trying new magic conditional, see if this works as intended.
Tobychev Oct 5, 2023
3aac74b
Trying new magic conditional, see if this works as intended.
Tobychev Oct 5, 2023
c8896f1
More tests of how to formulate conditional
Tobychev Oct 5, 2023
7e11415
Think I understand the problem now
Tobychev Oct 5, 2023
8dde9f7
Rebasing on main
Tobychev Oct 5, 2023
38471fd
Messing about with syntax
Tobychev Oct 5, 2023
0b623ab
Fix conflict with main
Tobychev Oct 5, 2023
c63ffcc
Adding skip to more stages
Tobychev Oct 5, 2023
58e1972
Changed the label triggering skipping tests
Tobychev Oct 6, 2023
4c9d8d1
Think I understand the problem now
Tobychev Oct 5, 2023
60e1203
Fix conflict with main
Tobychev Oct 5, 2023
25574ae
Rebasing on main
Tobychev Oct 5, 2023
198d05d
Change label
Tobychev Oct 31, 2023
a306dd9
Update ci.yml
Tobychev Oct 31, 2023
01324c0
Update ci.yml
Tobychev Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,28 @@ jobs:
key: ctapipe-test-data

- name: Prepare mamba installation
if: matrix.install-method == 'mamba'
if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
# setup correct python version
sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml

- name: mamba setup
if: matrix.install-method == 'mamba'
if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
cache-downloads: true

- name: Python setup
if: matrix.install-method == 'pip'
if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
check-latest: true

- if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }}
- if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
name: Fix Python PATH on macOS
# See https://github.com/actions/setup-python/issues/132 and
# https://github.com/actions/setup-python/issues/132#issuecomment-779406058
Expand All @@ -107,6 +107,7 @@ jobs:
tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"'

- name: Install dependencies
if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
run: |
python --version
pip install pytest-cov restructuredtext-lint pytest-xdist 'coverage!=6.3.0'
Expand All @@ -115,14 +116,17 @@ jobs:
pip freeze

- name: Static codechecks
if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
run: |
restructuredtext-lint README.rst

- name: ctapipe-info
if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
run: |
ctapipe-info --all

- name: Tests
if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
run: |
cd $(mktemp -d)
pytest -n auto --dist loadscope \
Expand Down