Feature/v4 integration #350
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: Oasislmf Integration | |
on: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
oasislmf_branch: | |
description: "Git install oasislmf branch before tests: [git ref]" | |
required: false | |
env: | |
oasislmf_branch: ${{ github.event_name != 'workflow_dispatch' && 'main' || inputs.oasislmf_branch }} | |
jobs: | |
build_ods: | |
uses: ./.github/workflows/build.yml | |
secrets: inherit | |
with: | |
ods_branch: ${{ github.ref }} | |
unittest: | |
name: Oasislmf unittests | |
runs-on: ubuntu-latest | |
needs: [build_ods] | |
steps: | |
- name: Clone Oasislmf repo | |
uses: actions/checkout@v3 | |
with: | |
repository: Oasislmf/Oasislmf | |
ref: ${{ env.oasislmf_branch }} | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install pip-tools | |
run: | | |
python -m pip install --upgrade pip | |
pip install pip-tools | |
- name: Pip Compile | |
run: | | |
rm -f requirements.txt | |
pip-compile requirements.in -o requirements.txt | |
pip install -r requirements.txt | |
- name: Download ods-tools package | |
uses: actions/download-artifact@v4 | |
with: | |
name: bin_package | |
path: ${{ github.workspace }}/ | |
- name: Install ods-tools package | |
run: | | |
pip uninstall ods-tools -y | |
pip install ${{ needs.build_ods.outputs.whl_filename }} | |
- name: Build & install oasislmf | |
run: | | |
python setup.py bdist_wheel --plat-name Linux_x86_64 | |
WHL_LINUX=$(find ./dist/ -name "oasislmf-*manylinux1_x86_64.whl") | |
pip install ${WHL_LINUX} | |
- name: Run Pytest | |
run: pytest -p no:flaky --ignore=fm_testing_tool --ignore=validation --cov-config=tox.ini --cov=oasislmf --cov-report=xml --cov-report=term |