Skip to content

Update node.js version in the old_docs workflow #227

Update node.js version in the old_docs workflow

Update node.js version in the old_docs workflow #227

Workflow file for this run

# Install from source and run tests
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
master-test-upload-coverage-ubuntu:
# The tests will run on ubuntu 22.04 with python version 3.10.
# Add other OSes like windows and macOS if needed as well as other Python versions
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
steps:
# The steps here are essentially command-line arguments that will be ran on the cloud with the above configurations
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
python -m pip install -e .[test,jax,openmdao,ipopt,sqp,csdl,pyslsqp,csdl_alpha,qpsolvers,cvxopt]
python -m pip install coveralls
- name: Download CUTEst sources
run: |
mkdir cutest
cd cutest
git clone https://github.com/ralna/ARCHDefs ./archdefs # ; cd archdefs; git checkout v2.2.8; cd ..
git clone https://github.com/ralna/SIFDecode ./sifdecode # ; cd sifdecode; git checkout v2.4.2; cd ..
git clone https://github.com/ralna/CUTEst ./cutest
cd cutest; git checkout v2.2.0; cd ..
git clone https://bitbucket.org/optrove/sif ./mastsif
cd ..
- name: Install CUTEst and pyCUTEst
env:
ARCHDEFS: ${{github.workspace}}/cutest/archdefs
SIFDECODE: ${{github.workspace}}/cutest/sifdecode
MASTSIF: ${{github.workspace}}/cutest/mastsif
CUTEST: ${{github.workspace}}/cutest/cutest
MYARCH: "pc64.lnx.gfo"
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/jfowkes/pycutest/master/.install_cutest.sh)"
cd $SIFDECODE/src ; make -f $SIFDECODE/makefiles/$MYARCH test # test the SIFDecode library
cd $CUTEST/src ; make -f $CUTEST/makefiles/$MYARCH test # test the CUTEst library
pip install pycutest
# Run the package tests and generate the coverage report
- name: Test with pytest
env:
ARCHDEFS: ${{github.workspace}}/cutest/archdefs
SIFDECODE: ${{github.workspace}}/cutest/sifdecode
MASTSIF: ${{github.workspace}}/cutest/mastsif
CUTEST: ${{github.workspace}}/cutest/cutest
MYARCH: "pc64.lnx.gfo"
PYCUTEST_CACHE: ${{github.workspace}}/pycutest_cache
run: |
mkdir pycutest_cache
pytest -m "not snopt and not visualization" tests/ --cov=modopt --cov-report lcov
# Upload the coverage report to coveralls
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN}}
file: ./coverage.lcov
install-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14, windows-2022]
python-version: ["3.9", "3.10", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
update-environment: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
# - name: Test with pytest
# run: |
# pytest
# cvxopt is installed with qpsolvers[open_source_solvers]
install-test-interfaces:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14, windows-2022]
python-version: ["3.9"]
# python-version: ["3.9", "3.10", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
update-environment: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test,qpsolvers,pycutest,openmdao,jax]
# - name: Test with pytest
# run: |
# pytest -m "interfaces"
# new csdl only works with python >=3.9
# old csdl has fixed dependencies which are not compatible with python <=3.8, and >=3.12
install-test-csdl:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14, windows-2022]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
update-environment: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test,csdl]
# - name: Test with pytest
# run: |
# pytest -m "interfaces"