Skip to content

Commit ebd88f6

Browse files
authored
Feat: Adds Github Actions for running CI jobs (#213)
* feat(Actions): Adds lint checking * feat(Actions): Adds Tests, package build
1 parent 40ee17b commit ebd88f6

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

.github/workflows/ci.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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: Test Package
5+
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest, windows-latest]
20+
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
21+
runs-on: ${{ matrix.os }}
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up Python ${{ matrix.python }}
25+
uses: actions/setup-python@v3
26+
with:
27+
python-version: ${{ matrix.python }}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install poetry
31+
poetry install
32+
- name: Lint with flake8
33+
run: make lint
34+
- name: Run Tests
35+
run: make test
36+
- name: Build Package
37+
run: |
38+
poetry build

.github/workflows/lint.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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: Lint
5+
6+
on: [push, pull_request]
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
strategy:
13+
matrix:
14+
python: ["3.11"]
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: ${{ matrix.python }}
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install flake8
26+
- name: Lint with flake8
27+
run: make lint

0 commit comments

Comments
 (0)