-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete testing part from Docs workflow and only build docs with Pytho…
…n 3.9
- Loading branch information
Showing
1 changed file
with
11 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
# This workflow installs PyGMT dependencies, build documentation and run tests | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
# This workflow installs PyGMT, builds and deploys documentation | ||
|
||
name: Tests | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
types: [opened, reopened, synchronize, ready_for_review] | ||
paths-ignore: | ||
- 'doc/**' | ||
- '*.md' | ||
- '*.json' | ||
paths: | ||
- 'README.rst' | ||
- 'LICENSE.txt' | ||
- 'doc/**' | ||
- 'examples/**' | ||
- 'pygmt/**' | ||
- '!pygmt/tests/**' | ||
release: | ||
types: | ||
- published | ||
# Schedule daily tests | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
test: | ||
docs: | ||
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9] | ||
python-version: [3.9] | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
# Is it a draft Pull Request (true or false)? | ||
isDraft: | ||
|
@@ -39,17 +35,6 @@ jobs: | |
isDraft: true | ||
- os: windows-latest | ||
isDraft: true | ||
- os: ubuntu-latest | ||
python-version: 3.7 | ||
isDraft: true | ||
- os: ubuntu-latest | ||
python-version: 3.8 | ||
isDraft: true | ||
|
||
# environmental variables used in coverage | ||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: ${{ matrix.python-version }} | ||
|
||
steps: | ||
# Cancel previous runs that are not completed | ||
|
@@ -110,32 +95,11 @@ jobs: | |
python setup.py sdist --formats=zip | ||
pip install dist/* | ||
# Run the tests | ||
- name: Test with pytest | ||
shell: bash -l {0} | ||
run: make test PYTEST_EXTRA="-r P" | ||
|
||
# Upload diff images on test failure | ||
- name: Upload diff images if any test fails | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} | ||
with: | ||
name: artifact-${{ runner.os }}-${{ matrix.python-version }} | ||
path: tmp-test-dir-with-unique-name | ||
|
||
# Build the documentation | ||
- name: Build the documentation | ||
shell: bash -l {0} | ||
run: make -C doc clean all | ||
|
||
# Upload coverage to Codecov | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.xml # optional | ||
env_vars: OS,PYTHON | ||
fail_ci_if_error: false | ||
|
||
- name: Checkout the gh-pages branch | ||
uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b | ||
with: | ||
|
@@ -144,7 +108,7 @@ jobs: | |
path: deploy | ||
# Download the entire history | ||
fetch-depth: 0 | ||
if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') | ||
if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') | ||
|
||
- name: Push the built HTML to gh-pages | ||
run: | | ||
|
@@ -195,4 +159,4 @@ jobs: | |
echo -e "\nPushing changes to gh-pages." | ||
git push -fq origin gh-pages 2>&1 >/dev/null | ||
echo -e "\nFinished uploading generated files." | ||
if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') | ||
if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') |