Skip to content

Commit 47fdea1

Browse files
authored
Merge pull request #36 from boriel/feat/update_packaging
Add GitHub workflow to automatically run test upon PR
2 parents d7eafca + e7f57ad commit 47fdea1

2 files changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/python-app.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI/CD test
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
- main
11+
pull_request:
12+
branches:
13+
- master
14+
- main
15+
16+
env:
17+
PYTHON_VERSION: 3.12.4
18+
19+
jobs:
20+
build:
21+
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Python ${{ env.PYTHON_VERSION }}
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ env.PYTHON_VERSION }}
32+
33+
- name: Caches pip
34+
uses: actions/cache@v4
35+
with:
36+
path: ~/.cache/pip
37+
key: ${{ runner.os }}-pip-py-${{ env.PYTHON_VERSION }}
38+
39+
- name: Install dependencies
40+
run: |
41+
pip install -r requirements.txt
42+
pip install -r dev-requirements.txt
43+
44+
- name: Lint code
45+
run: ruff check
46+
47+
- name: Run tests
48+
run: pytest test

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[tool.ruff]
2+
line-length = 120
3+
target-version = "py312"
4+

0 commit comments

Comments
 (0)