From d62e92807ca7928213e06bff50a75120f5b61d17 Mon Sep 17 00:00:00 2001 From: eli knaap Date: Mon, 2 Oct 2023 12:43:11 -0700 Subject: [PATCH 1/4] publish codecov step --- .github/workflows/unittests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index e28ffa7f..f7a806da 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -53,4 +53,14 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml - name: geosnap-codecov \ No newline at end of file + name: geosnap-codecov + + - name: Generate and publish the report + if: | + failure() + && steps.status.outcome == 'failure' + && github.event_name == 'schedule' + && github.repository_owner == 'oturns' + uses: xarray-contrib/issue-from-pytest-log@v1 + with: + log-path: pytest-log.jsonl \ No newline at end of file From e3765eb9070ea3442c674b105d0d8c03bf03bd4c Mon Sep 17 00:00:00 2001 From: eli knaap Date: Mon, 2 Oct 2023 13:24:08 -0700 Subject: [PATCH 2/4] run with coverage --- .github/workflows/unittests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index f7a806da..3604d200 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -46,8 +46,7 @@ jobs: - name: Test geosnap run: | - pytest -v --color yes --cov=geosnap --cov-append --cov-report term-missing --cov-report xml . - + coverage run -m pytest -v --color yes --cov=geosnap --cov-append --cov-report term-missing --cov-report xml . - name: codecov uses: codecov/codecov-action@v3 with: From 53252356b6ebd8847016c1237df8942e1006d306 Mon Sep 17 00:00:00 2001 From: eli knaap Date: Mon, 2 Oct 2023 13:37:03 -0700 Subject: [PATCH 3/4] update docs workflow --- .ci/310.yml | 4 ++ .github/workflows/build_docs.yml | 67 ++++++++++++++++---------------- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/.ci/310.yml b/.ci/310.yml index bb5fd5f2..6804b9c4 100644 --- a/.ci/310.yml +++ b/.ci/310.yml @@ -37,3 +37,7 @@ dependencies: - contextily - scikit-plot - python-graphviz + - sphinx>=1.4.3 + - sphinxcontrib-bibtex==1 + - sphinx_bootstrap_theme + - numpydoc diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index af0611af..8d8618bc 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -1,48 +1,46 @@ name: Build Docs + on: push: - branches: - - master - - main + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + workflow_dispatch: + inputs: + version: + description: Manual Doc Build + default: test + required: false jobs: docs: - name: CI (${{ matrix.os }}-${{ matrix.environment-file }}) + name: build & push docs runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.experimental }} - timeout-minutes: 20 + timeout-minutes: 90 strategy: matrix: os: ['ubuntu-latest'] - environment-file: [.ci/39.yml] + environment-file: [.ci/envs/310.yml] experimental: [false] defaults: run: shell: bash -l {0} + steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 - env: - CACHE_NUMBER: 0 + - name: checkout repo + uses: actions/checkout@v3 + + - name: setup micromamba + uses: mamba-org/setup-micromamba@v1 with: - path: ~/conda_pkgs_dir - key: ${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(matrix.environment-file) }} - - uses: conda-incubator/setup-miniconda@v2 - with: - miniconda-version: 'latest' - channels: conda-forge - channel-priority: true - auto-update-conda: true - auto-activate-base: false - environment-file: ${{ matrix.environment-file }} - activate-environment: test - use-only-tar-bz2: true - - run: conda info --all - - run: conda list - - run: conda config --show-sources - - run: conda config --show - - run: pip install -e . --no-deps --force-reinstall - - run: cd docs; make html - - name: Commit documentation changes + environment-file: ${{ matrix.environment-file }} + micromamba-version: 'latest' + + - name: make docs + run: | + pip install -e . --no-deps --force-reinstall + cd docs; make html + + - name: commit docs run: | git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages cp -r docs/_build/html/* gh-pages/ @@ -51,12 +49,13 @@ git config --local user.name "GitHub Action" git add . git commit -m "Update documentation" -a || true - # The above command will fail if no changes were present, so we ignore - # the return code. - - name: Push changes + # The above command will fail if no changes were present, + # so we ignore the return code. + + - name: push to gh-pages uses: ad-m/github-push-action@master with: branch: gh-pages directory: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} - force: true + force: true \ No newline at end of file From ca0dd8725ad9a629563907efdd43ce2fc2b5cc2a Mon Sep 17 00:00:00 2001 From: eli knaap Date: Mon, 2 Oct 2023 13:39:48 -0700 Subject: [PATCH 4/4] no envs --- .github/workflows/build_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 8d8618bc..c1734ab0 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -19,7 +19,7 @@ strategy: matrix: os: ['ubuntu-latest'] - environment-file: [.ci/envs/310.yml] + environment-file: [.ci/310.yml] experimental: [false] defaults: run: