Skip to content

Commit

Permalink
Merge pull request #37 from TomTranter/CI
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
TomTranter authored Feb 8, 2024
2 parents c014c59 + 386a9ba commit b417714
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 86 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Unit tests

on:
pull_request:
push:
branches: [main]

jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
- 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 -e ".[dev]"
- name: Test with pytest
run: |
pytest
- name: Generate Coverage Report
run: |
pip install coverage
coverage run -m unittest
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
23 changes: 0 additions & 23 deletions .github/workflows/codecov.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Static analysis

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
59 changes: 0 additions & 59 deletions .github/workflows/test_on_push.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ jellybamm/__pycache__/
jellybamm.egg-info/
*.pyc
.coverage
jellybamm/output/1d/
jellybamm/output/spiral/1.5A/
jellybamm/output/spiral_tesla/
jellybamm/output/tomography/3.0A/
jellybamm/output/
build/
dist/
.virtual_documents/
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,10 @@ dependencies = [
"ipywidgets"
]

[project.optional-dependencies]
dev = [
"pytest",
]

[tool.setuptools.packages.find]
include = ["jellybamm"]

0 comments on commit b417714

Please sign in to comment.