Skip to content

Watchman Tests

Watchman Tests #1982

name: Watchman Tests
# This workflow will run tests with an up-to-date production environment instead
# of the locked one.
# It will warn developers if any update of a dependency broke something.
on:
workflow_dispatch:
workflow_call:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '12 4 * * *'
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.10" ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install
# Development version of OpenMDAO is installed to ensure preview of any problem.
# Installing pytest-cov is needed because of pytest.ini
run: |
pip install git+https://github.com/OpenMDAO/OpenMDAO.git
pip install .
pip install pytest pytest-cov nbval
shell: bash
- name: List installed packages
# List packages and versions for postmortem analysis.
run: pip list --format=freeze | tee requirements.txt
shell: bash
- uses: actions/upload-artifact@v3
with:
name: pip package list
path: requirements.txt
- name: Unit tests
if: ${{ runner.os == 'Linux' }} # WhatsOpt tests will be run only on Linux to avoid unneeded traffic
env:
RUN_WEB_REQUESTS: 'True'
run: pytest --no-cov src
shell: bash
- name: Unit tests
if: ${{ runner.os != 'Linux' }}
run: pytest --no-cov src
shell: bash
- name: Notebook tests
run: pytest --no-cov --nbval-lax -p no:python src/fastoad/notebooks
shell: bash