forked from DadaNanjesha/AI-Text-Humanizer-App
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.67 KB
/
Copy pathpython-app.yml
File metadata and controls
55 lines (45 loc) · 1.67 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
52
53
54
55
name: Python application CI
on:
push:
branches: [ "dev", "main" ]
pull_request:
branches: [ "dev", "main" ]
permissions:
contents: read
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
# 1. Check out the repository
- name: Check out repository
uses: actions/checkout@v4
# 2. Set up Python
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
# 3. Upgrade pip & install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# If you use a requirements.txt for the main libs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Or explicitly install certain libraries if not in requirements.txt
pip install streamlit spacy nltk sentence-transformers
# 4. Download spaCy model & NLTK data so tests won't fail
- name: Download spaCy & NLTK data
run: |
python -m spacy download en_core_web_sm
python -c "import nltk;
nltk.download('punkt_tab', quiet=True);
nltk.download('punkt', quiet=True);
nltk.download('wordnet', quiet=True);
nltk.download('averaged_perceptron_tagger', quiet=True)"
# 5. Lint
- name: Lint with flake8
run: |
pip install flake8
# Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics