Skip to content

Commit f23daf7

Browse files
authored
Add CI (#1)
Add CI
1 parent 87f8869 commit f23daf7

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/black.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches: [ "master" ]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: psf/black@stable

.github/workflows/unittest.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python application
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
# Include all supported version of Python here.
21+
python-version: ["3.11"]
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
cache: 'pip' # caching pip dependencies
30+
cache-dependency-path: '**/pyproject.toml'
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install ruff pytest
35+
pip install -e .
36+
- name: Lint with ruff
37+
run: |
38+
# stop the build if there are Python syntax errors or undefined names
39+
ruff check .
40+
- name: Run tests
41+
run: python -m pytest tests

0 commit comments

Comments
 (0)