Skip to content

[pre-commit.ci] pre-commit autoupdate #951

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #951

Workflow file for this run

name: SheepRL CPU tests
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
defaults:
run:
shell: bash
jobs:
cpu-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
requirements.txt
setup.py
- name: Create venv
run: |
python -m venv env
- name: Install packages Windows
if: ${{ matrix.os == 'windows-latest' }}
shell: powershell
run: |
choco upgrade swig -y
env\\Scripts\\Activate.ps1
python -m pip install -e .[atari,box2d,test,dev]
- name: Install packages Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get install --no-install-recommends -y --only-upgrade swig
source env/bin/activate
python -m pip install -e .[atari,box2d,test,dev]
- name: Run tests Windows
if: ${{ matrix.os == 'windows-latest' }}
shell: powershell
run: |
env\\Scripts\\Activate.ps1
python tests/run_tests.py
- name: Run tests Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
source env/bin/activate
python tests/run_tests.py