Skip to content

Run Tests

Run Tests #2302

Workflow file for this run

name: Run Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0, 0,12 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
formatting:
name: Check Formatting
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Formatting
run: |
python -m pip install --upgrade pip
pip install hacking isort
- name: Check Formatting
run: |
flake8 .
grep -rlIP '[^\x00-\x7F]' skrobot | grep '\.pyx\?' | sort > unicode.out; grep -rlI '# -\*- coding: \(utf-8\|latin-1\) -\*-' skrobot | grep '\.pyx\?' | sort > coding.out; comm -23 unicode.out coding.out > test_code.out; cat test_code.out; test \! -s test_code.out
- name: Check isort
run: |
isort -c .
requirements-formatting:
name: Check Requirements Formatting
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Check Formatting
run: |
sort -C requirements.txt
tests-3x:
name: Run Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6.15, 3.8.16, 3.10.10]
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install APT On Linux
run: |
sudo apt-get update -qq -y
sudo apt-get install -qq -y libspatialindex-dev freeglut3-dev libsuitesparse-dev libblas-dev liblapack-dev
- name: Install Pytest
run: |
python -m pip install --upgrade pip setuptools wheel
pip install Cython
pip install pytest hacking
- name: Install scikit-robot
run: |
pip cache purge
pip install --no-cache-dir .[all] "numpy<2.0"
- name: Run Pytest
run: pytest -v tests
tests-2x:
name: Run Unit Tests
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
steps:
- uses: actions/checkout@v3
- name: Install APT On Linux
run: |
apt-get update && apt-get install sudo cmake -y
sudo apt-get update -qq -y
sudo apt-get install -qq -y libspatialindex-dev freeglut3-dev libsuitesparse-dev libblas-dev liblapack-dev
- name: Install Pytest
run: |
python -m pip install --upgrade pip setuptools wheel
pip install Cython
pip install pytest hacking
- name: Install scikit-robot
run: pip install --no-cache-dir .[all]
- name: Run Pytest
run: sudo pytest -v tests # require sudo to access /tmp dir