Skip to content

Commit b76f94e

Browse files
authored
Merge pull request #1 from jvm123/feature/github-workflows
Added github actions for linting and unit tests
2 parents 1f08698 + 4d00a91 commit b76f94e

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/python-lint.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-python@v5
11+
with:
12+
python-version: "3.13"
13+
- uses: psf/black@stable
14+
with:
15+
options: "--check --verbose"
16+
src: "./openevolve ./tests ./examples"
17+
use_pyproject: true

.github/workflows/python-test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Python Unit Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.9'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -e ".[dev]"
22+
23+
- name: Run unit tests
24+
run: |
25+
python -m unittest discover -s tests -p "*.py"

0 commit comments

Comments
 (0)