-
Notifications
You must be signed in to change notification settings - Fork 9
83 lines (79 loc) · 2.46 KB
/
linux_test.yml
File metadata and controls
83 lines (79 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Linux tests and Page deployment
on:
pull_request:
workflow_dispatch:
inputs:
git-ref:
description: Git Ref
default: master
required: true
debug_enabled:
type: boolean
description: 'tmate debug enabled'
required: false
default: false
schedule:
- cron: "0 1 * * 0"
jobs:
vulnerability_test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup debugging session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Install Dependencies of OpenQuake engine
run: |
curl -L -O https://github.com/gem/oq-engine/raw/master/install.py
python install.py user --version=master
- name: Install vmtk Package
run: |
source ~/openquake/bin/activate
PY_VER=`echo py${{ matrix.python-version }} | tr -d .`
echo $PY_VER
export PIP_DEFAULT_TIMEOUT=100
pip install -r requirements-$PY_VER-linux.txt
pip install -e .
- name: Run tests
run: |
source ~/openquake/bin/activate
cd openquake/vmtk
pytest -v --doctest-modules -x --color=yes --durations=10 tests/
pages:
needs: vulnerability_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install sphinx and themes
run: |
python -m pip install --upgrade pip
pip install sphinx recommonmark sphinx_rtd_theme nbsphinx
# Install package so autodoc can import modules (openseespy mocked in conf.py)
pip install numpy scipy pandas matplotlib
pip install -e .
- name: Make html pages
run: |
cd docsrc && make html
touch _build/html/.nojekyll
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: docsrc/_build/html/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}