Skip to content

test and make pages #1570

test and make pages

test and make pages #1570

Workflow file for this run

name: test and make pages
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: "0 2 * * *"
jobs:
test:
name: hazard test
runs-on: ubuntu-latest
env:
MPLBACKEND: 'Agg'
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
git clone --depth=1 https://github.com/gem/oq-engine.git
pip -q install -r oq-engine/requirements-py38-linux64.txt
pip -q install -e oq-engine
pip install -e .
- name: Run test with pytest
run: |
cd openquake
pytest -vsx cat ghm man mbt sub wkf smt
pages:
name: pages
runs-on: ubuntu-latest
env:
MPLBACKEND: 'Agg'
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get install pandoc
python -m pip install --upgrade pip
git clone --depth=1 https://github.com/gem/oq-engine.git
pip -q install -r oq-engine/requirements-py38-linux64.txt
pip -q install -e oq-engine
pip install sphinx
pip install recommonmark
pip install sphinx_rtd_theme
pip install nbsphinx
- name: Make html pages
run: |
cd docsrc ; sphinx-apidoc -o contents/ ../openquake ; make html
touch _build/html/.nojekyll
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docsrc/_build/html/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}