-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (43 loc) · 1.69 KB
/
Copy pathpython-app.yml
File metadata and controls
51 lines (43 loc) · 1.69 KB
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
49
50
51
# This workflow is for Continuous Integration (CI).
# It runs on every push and pull request to automatically check code quality.
name: TubeZ CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
lint:
name: Lint Code with Flake8
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository code so the action can access it.
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Set up the Python version.
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
# Step 3: Install dependencies.
# We install flake8 for linting and then install our actual project
# in editable mode to pull in all its dependencies (Flask, etc.).
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -e .
# Step 4: Run the linter.
# This checks for common Python errors and style issues.
# The --exit-zero flag means it will report errors but won't fail the build,
# which is good to have while you're actively developing.
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 src/tubez/ --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 src/tubez/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Note: The 'Test with pytest' step has been removed because no tests are configured.
# When you add tests in the future, you can add a new job for them.