Skip to content

add all tests for macos #387

add all tests for macos

add all tests for macos #387

name: MacOS Intel install and test
'on':
workflow_dispatch:
inputs:
git-ref:
description: Git Ref
default: master
required: true
schedule:
- cron: "0 1 * * *"
push:
branches: [macos_test]
jobs:
Install_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-12]
python-version: [3.9, "3.10"]
steps:
# This Checkout use git-ref keyword from dispatch
- name: Clone Repository (Master)
uses: actions/checkout@v2
if: github.event.inputs.git-ref == ''
- name: Clone Repository (Custom Ref)
uses: actions/checkout@v2
if: github.event.inputs.git-ref != ''
with:
ref: ${{ github.event.inputs.git-ref }}
- name: Set up Python3
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run Installation of oq-engine in devel mode
env:
BRANCH: ${{ github.event.inputs.git-ref }}
run: |
export PIP_DEFAULT_TIMEOUT=100
pip3 install -U pip wheel setuptools
#
echo "branch to test: ${BRANCH}"
if [[ "$BRANCH" != "" ]]
then
python install.py devel --version ${BRANCH}
else
python install.py devel
fi
- name: Run demos and pytest to test installation
run: |
source ~/openquake/bin/activate
pip3 install pytest
oq --version
oq dbserver start
pytest -vs --color=yes /Users/runner/work/oq-engine/oq-engine/openquake/
sleep 2
oq engine --run ~/work/oq-engine/oq-engine/demos/risk/ClassicalDamage/job_hazard.ini
#
oq engine --run https://downloads.openquake.org/jobs/risk_test.zip
sleep 3
oq engine --run "https://github.com/gem/oq-engine/blob/master/openquake/server/tests/data/classical.zip?raw=true"