Skip to content

Commit

Permalink
ci: Add GitHub Actions workflow for running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaskoepf committed Jan 30, 2025
1 parent 3e01b7d commit 0f36292
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Run tests
run: |
pytest
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ dependencies = [
"magiccube==0.3.0",
"pyfiglet==1.0.2"
]

[project.optional-dependencies]
test = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
]

[tool.pytest.ini_options]
addopts = "-ra -q --cov=reasoning_gym"
testpaths = [
"tests",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
Expand Down

0 comments on commit 0f36292

Please sign in to comment.