Skip to content

Commit

Permalink
CI tests (#2)
Browse files Browse the repository at this point in the history
* Ad requirements file

* Add Github action for automated tests

* Fix black commands

* Do not fail fast

* Separate linting

* Fix pytest command

* Remove macos
  • Loading branch information
relf authored Oct 31, 2023
1 parent 1171ffa commit 41f7bce
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Linting

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Check format with black
run: |
black --version
black --diff pyDOE3
black --check pyDOE3
34 changes: 34 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.11"]
include:
- os: ubuntu-latest
python-version: "3.8"

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

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
- name: Test with pytest
run: pytest
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
numpy
scipy
black
pytest

0 comments on commit 41f7bce

Please sign in to comment.