Skip to content

Commit

Permalink
Add back test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
jagdeepsb committed Jun 19, 2024
1 parent 2f4ff79 commit 501cf34
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 5 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Test

on: [push]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
os:
- "ubuntu-latest"
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Update deb repository
run: sudo apt-get update
- name: Install deb dependencies
run: sudo apt-get install -y xorg-dev libglu1-mesa-dev libglew-dev xvfb
- name: Install python dependencies
run: pip install -r requirements-dev.txt
- name: Cache python wheel packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: wheel-cache-${{ hashFiles('requirements-dev.txt') }}
- name: Install evolution gym
run: pip install -e .
- name: Run test
run: xvfb-run pytest -s -v -n auto -m lite
working-directory: tests
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,18 @@ pip install -r requirements-dev.txt

## Run Tests

Run the full test suite:
From within the `tests` directory run the full test suite:

```shell
cd tests
pytest -s -v -n auto
```

Or the lite test suite:


```shell
cd tests
pytest -s -v -n auto -m lite
```

Expand Down
4 changes: 0 additions & 4 deletions pytest.ini

This file was deleted.

3 changes: 3 additions & 0 deletions tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
markers =
lite: mark as part of the lite test suite

0 comments on commit 501cf34

Please sign in to comment.