Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #67

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #67

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
python: 3.7
torch: 1.9.0+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: ubuntu-latest
python: 3.8
torch: 1.9.0+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
slow: True
- os: ubuntu-latest
python: 3.9
torch: 1.9.0+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: ubuntu-latest
python: "3.10"
torch: 1.13.1+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: macos-11
python: 3.7
torch: 1.9.0
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: macos-11
python: 3.8
torch: 1.9.0
torch-source: https://download.pytorch.org/whl/torch_stable.html
conda: True
- os: macos-11
python: 3.9
torch: 1.9.0
torch-source: https://download.pytorch.org/whl/torch_stable.html
- os: windows-latest
python: 3.8
torch: 1.9.0+cpu
torch-source: https://download.pytorch.org/whl/torch_stable.html
env:
DEBUG: 1
# DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
steps:
- run: ls -n /Applications/ | grep Xcode*
if: matrix.os == 'macos-11'
- uses: actions/checkout@v3
- name: Data setup
if: matrix.slow
run: |
wget -q https://github.com/vita-epfl/trajnetplusplusdata/releases/download/v4.0/train.zip
mkdir data-trajnet
unzip train.zip -d data-trajnet
- name: Set up Python ${{ matrix.python }}
if: ${{ !matrix.conda }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Set up Conda
if: matrix.conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python }}
conda-channels: anaconda, conda-forge
- run: conda --version
if: matrix.conda
- run: which python
if: matrix.conda
- run: python --version
- name: Install pre-requisites
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install torch==${{ matrix.torch }} -f ${{ matrix.torch-source }}
- name: Install
run: |
echo ${DEBUG}
python -m pip install -e ".[dev,plot]" --no-build-isolation
- name: Install ffmpeg for Guide test
uses: FedericoCarboni/setup-ffmpeg@v1
if: matrix.slow
id: setup-ffmpeg
- name: ffmpeg codecs
if: matrix.slow
run: ffmpeg -codecs
- name: Print environment
run: |
python -m pip freeze
python --version
python -c "import socialforce; print(socialforce.__version__)"
- name: Lint socialforce
run: |
pylint socialforce --disable=fixme
- name: Lint tests
if: matrix.os != 'windows-latest' # because of path separator
run: |
pylint tests/test_*.py --disable=fixme
- name: pycodestyle socialforce
run: |
python -m pycodestyle socialforce
- name: pycodestyle tests
if: matrix.os != 'windows-latest' # because of path separator
run: |
python -m pycodestyle tests/test_*.py
- name: Check notebook formats and tags
if: matrix.slow
run: |
cd guide
python nb_cell_tags.py # runs all notebooks through nbformat
git status
git diff
git diff-index --quiet HEAD # exit code 1 when files were changed
- name: Check that notebook outputs are stripped
if: matrix.slow
run: |
cd guide
nbstripout *.ipynb
git status
git diff
git diff-index --quiet HEAD # exit code 1 when files were changed
- name: Lint and pycodestyle on notebooks
if: matrix.slow
run: |
mkdir guide_py
jupyter nbconvert --to=script --output-dir=./guide_py ./guide/*.ipynb
pylint ./guide_py/*.py --disable=trailing-whitespace,trailing-newlines,line-too-long,pointless-statement,undefined-variable,expression-not-assigned,wrong-import-position,ungrouped-imports,wrong-import-order,invalid-name
pycodestyle guide_py/*.py --ignore=W291,W391,E302,E305,E402,E501
- name: Test
env:
PYTHONDEVMODE: 1
run: |
pytest -vv -m "not slow"
- name: Test guide
if: matrix.slow
timeout-minutes: 45
run: |
cd guide && pytest --nbval-lax --current-env *.ipynb && cd ..