Skip to content

Commit 542758c

Browse files
committed
ci: set rules for tests/docs to be run only on push and PR to main. Now installs only sphinx from dev_requirements to build_docs environment
1 parent 325993d commit 542758c

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: docs
22

33
on:
44
push:
5-
branches-ignore:
6-
- 'v*'
5+
branches:
6+
- main
77
pull_request:
88
branches: [ main ]
99

@@ -23,12 +23,9 @@ jobs:
2323
create-args: >-
2424
python=${{ matrix.python-version }}
2525
26-
- name: Install pip dependencies
27-
run: |
28-
pip install -r requirements_dev.txt
29-
3026
- name: Install floatCSEP
3127
run: |
28+
pip install sphinx sphinx-autoapi sphinx-gallery sphinx-rtd-theme
3229
pip install --no-deps -e .
3330
python -c "import floatcsep; print('Version: ', floatcsep.__version__)"
3431

.github/workflows/build-test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ name: tests
22

33
on:
44
push:
5-
branches-ignore:
6-
- 'v*'
5+
branches:
6+
- main
77
pull_request:
8+
branches: [ main ]
89

910
jobs:
1011
build:
@@ -37,7 +38,7 @@ jobs:
3738
3839
- name: Test with pytest
3940
run: |
40-
pytest --cov=./ --cov-config=.coveragerc
41+
pytest --durations=0 --cov=./ --cov-config=.coveragerc
4142
4243
- name: Upload coverage
4344
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'

0 commit comments

Comments
 (0)