Skip to content

Commit

Permalink
Merge pull request oturns#377 from knaaptime/lodesupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
knaaptime committed Oct 2, 2023
2 parents ea1d253 + ca0dd87 commit 32f6224
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 37 deletions.
4 changes: 4 additions & 0 deletions .ci/310.yml
Expand Up @@ -37,3 +37,7 @@ dependencies:
- contextily
- scikit-plot
- python-graphviz
- sphinx>=1.4.3
- sphinxcontrib-bibtex==1
- sphinx_bootstrap_theme
- numpydoc
67 changes: 33 additions & 34 deletions .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/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/
Expand All @@ -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
15 changes: 12 additions & 3 deletions .github/workflows/unittests.yml
Expand Up @@ -46,11 +46,20 @@ 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:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: geosnap-codecov
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

0 comments on commit 32f6224

Please sign in to comment.