-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.3 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Test and Lint Workflow
on:
push:
branches:
- '*'
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checkout the code from the repository
- name: Checkout code
uses: actions/checkout@v3
# Set up Python environment
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: [3.10, 3.11, 3.12]
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev] # Install both runtime and dev dependencies
# Run linting with ruff (this will catch print statements)
- name: Lint with ruff
run: |
pip install ruff # Ensure ruff is available if not installed through dev dependencies
ruff check mumble tests # Lint your package and test directories
# Run formatting checks with black
- name: Check formatting with black
run: |
pip install black # Ensure black is available if not installed through dev dependencies
black --check . # Check if code is correctly formatted
# Run tests with pytest
- name: Run tests with pytest
run: |
pip install pytest
pytest --disable-warnings -q