Skip to content

Commit 4578d0a

Browse files
committed
Delete testing part from Docs workflow and only build docs with Python 3.9
1 parent 2b1cfbd commit 4578d0a

File tree

1 file changed

+12
-47
lines changed

1 file changed

+12
-47
lines changed

.github/workflows/docs.yml

+12-47
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
1-
# This workflow installs PyGMT dependencies, build documentation and run tests
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
1+
# This workflow installs PyGMT, builds and deploys documentation
32

4-
name: Tests
3+
name: Docs
54

65
on:
76
push:
87
branches: [ master ]
98
pull_request:
109
types: [opened, reopened, synchronize, ready_for_review]
11-
paths-ignore:
12-
- 'doc/**'
13-
- '*.md'
14-
- '*.json'
10+
paths:
11+
- '.github/workflows/**'
1512
- 'README.rst'
16-
- 'LICENSE.txt'
13+
- 'doc/**'
14+
- 'examples/**'
15+
- 'pygmt/**'
16+
- '!pygmt/tests/**'
1717
release:
1818
types:
1919
- published
20-
# Schedule daily tests
21-
schedule:
22-
- cron: '0 0 * * *'
2320

2421
jobs:
25-
test:
22+
docs:
2623
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
2724
runs-on: ${{ matrix.os }}
2825
strategy:
2926
fail-fast: false
3027
matrix:
31-
python-version: [3.7, 3.8, 3.9]
28+
python-version: [3.9]
3229
os: [ubuntu-latest, macOS-latest, windows-latest]
3330
# Is it a draft Pull Request (true or false)?
3431
isDraft:
@@ -39,17 +36,6 @@ jobs:
3936
isDraft: true
4037
- os: windows-latest
4138
isDraft: true
42-
- os: ubuntu-latest
43-
python-version: 3.7
44-
isDraft: true
45-
- os: ubuntu-latest
46-
python-version: 3.8
47-
isDraft: true
48-
49-
# environmental variables used in coverage
50-
env:
51-
OS: ${{ matrix.os }}
52-
PYTHON: ${{ matrix.python-version }}
5339

5440
steps:
5541
# Cancel previous runs that are not completed
@@ -110,32 +96,11 @@ jobs:
11096
python setup.py sdist --formats=zip
11197
pip install dist/*
11298
113-
# Run the tests
114-
- name: Test with pytest
115-
shell: bash -l {0}
116-
run: make test PYTEST_EXTRA="-r P"
117-
118-
# Upload diff images on test failure
119-
- name: Upload diff images if any test fails
120-
uses: actions/upload-artifact@v2
121-
if: ${{ failure() }}
122-
with:
123-
name: artifact-${{ runner.os }}-${{ matrix.python-version }}
124-
path: tmp-test-dir-with-unique-name
125-
12699
# Build the documentation
127100
- name: Build the documentation
128101
shell: bash -l {0}
129102
run: make -C doc clean all
130103

131-
# Upload coverage to Codecov
132-
- name: Upload coverage to Codecov
133-
uses: codecov/[email protected]
134-
with:
135-
file: ./coverage.xml # optional
136-
env_vars: OS,PYTHON
137-
fail_ci_if_error: false
138-
139104
- name: Checkout the gh-pages branch
140105
uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b
141106
with:
@@ -144,7 +109,7 @@ jobs:
144109
path: deploy
145110
# Download the entire history
146111
fetch-depth: 0
147-
if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9')
112+
if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest')
148113

149114
- name: Push the built HTML to gh-pages
150115
run: |
@@ -195,4 +160,4 @@ jobs:
195160
echo -e "\nPushing changes to gh-pages."
196161
git push -fq origin gh-pages 2>&1 >/dev/null
197162
echo -e "\nFinished uploading generated files."
198-
if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9')
163+
if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest')

0 commit comments

Comments
 (0)