Fix Get-Children -> Get-ChildItem #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows full tests of OpenQuake Engine | |
on: | |
push: | |
branches: [windows-all-tests] | |
# workflow_dispatch: | |
# inputs: | |
# git-ref: | |
# description: Git Ref | |
# default: master | |
# required: true | |
# push: | |
# branches: [ ae-win_numba ] | |
jobs: | |
install_and_test: | |
runs-on: windows-latest | |
env: | |
GITHUB_PULL_REQUEST: ${{ github.event.number }} | |
GITHUB_DEF_BR: ${{ github.event.repository.default_branch }} | |
GITHUB_REF: ${{ github.ref }} | |
GITHUB_HD_REF: ${{ github.head_ref }} | |
GITHUB_BS_REF: ${{ github.base_ref }} | |
BRANCH: ${{ github.event.inputs.git-ref }} | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: Check out the codebase. | |
uses: actions/checkout@v2 | |
# 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 Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# You can test your matrix by printing the current Python version | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Echo env var | |
env: | |
BRANCH: ${{ github.event.inputs.git-ref }} | |
run: | | |
echo "${Env:environment}" | |
Write-Host $Env:GITHUB_REF | |
echo "Branch environment" | |
Write-Host $Env:BRANCH | |
- name: Install engine on developer mode | |
env: | |
BRANCH: ${{ github.event.inputs.git-ref }} | |
run: | | |
set PIP_DEFAULT_TIMEOUT=100 | |
python -m pip install pip --upgrade | |
#echo Branch to test %BRANCH% | |
#if %BRANCH%=="" (python install.py devel) else (python install.py devel --version %BRANCH%) | |
write-Host "Branch to test $Env:BRANCH " | |
if ($Env:BRANCH) | |
{ | |
Write-Host "Install with workflow_dispatch" | |
Write-Host "python install.py devel --version ${env:BRANCH}" | |
python install.py devel --version ${env:BRANCH} | |
} | |
else | |
{ | |
Write-Host "Install on scheduled task" | |
Write-Host "python install.py devel " | |
python install.py devel | |
} | |
- name: Run all demos | |
run: | | |
C:\Users\runneradmin\openquake\Scripts\activate.ps1 | |
# FIXME: why those different exports? (using the same as in run-demos.sh) | |
Get-ChildItem "D:\a\oq-engine\oq-engine\openquake\demos" -Recurse -Filter job.ini | ForEach-Object { oq engine --run $_.FullName --exports xml,hdf5 -p pointsource_distance=0 -r } | |
Get-ChildItem "D:\a\oq-engine\oq-engine\openquake\demos" -Recurse -Directory | ForEach-Object { $demoDir=$_.FullName; Get-ChildItem $_.FullName -Filter job_hazard.ini | ForEach-Object { oq engine --run $demoDir\job_hazard.ini --exports npz -p pointsource_distance=0; oq engine --run $demoDir\job_risk.ini --hc -1 } } | |
- name: Run all engine tests | |
run: | | |
C:\Users\runneradmin\openquake\Scripts\activate.ps1 | |
# | |
#python -c 'import fiona' | |
oq --version | |
Start-Job -ScriptBlock{& 'C:\Users\runneradmin\openquake\Scripts\oq.exe' dbserver start} | |
python -m pip install pytest | |
pytest -vs --color=yes D:\a\oq-engine\oq-engine\openquake |