Skip to content

Commit b8c0bcd

Browse files
committed
ops: add github workflow to automatically run tests
1 parent 78af348 commit b8c0bcd

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Testing Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Lint, Format, and Test
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
python-version: [3.11]
19+
20+
steps:
21+
# Step 1: Checkout the repository
22+
- name: Checkout Repository
23+
uses: actions/checkout@v3
24+
25+
# Step 2: Set up Python environment
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
cache: 'pip'
31+
32+
# Step 3: Install dependencies
33+
- name: Install Dependencies
34+
run: |
35+
pip install --upgrade pip
36+
pip install -r requirements.txt
37+
pip install .[test,lint]
38+
39+
40+
# Step 4: Lint with flake8
41+
- name: Lint
42+
run: |
43+
flake8 .
44+
45+
# Step 5: Check formatting with black
46+
- name: Check formatting
47+
run: |
48+
black --check .
49+
50+
# Step 6: Run tests
51+
- name: Run Tests with pytest
52+
run: |
53+
pytest --cov=.

0 commit comments

Comments
 (0)