From 5bbad55348dc81d9813a3c83ac4a6a85ca442366 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 9 Mar 2021 23:47:04 -0500 Subject: [PATCH] Delete testing part from Docs workflow and only build docs with Python 3.9 --- .github/workflows/docs.yml | 58 ++++++++------------------------------ 1 file changed, 11 insertions(+), 47 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index df714fd1fbb..b7086029178 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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/codecov-action@v1.2.1 - 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')