-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 772 Bytes
/
Copy pathpython-ci.yml
File metadata and controls
38 lines (31 loc) · 772 Bytes
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
name: Python CI/CD
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
# Lint the code
- name: Lint Code
run: |
pip install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Run your Python script (as a basic test)
- name: Run File Organizer
run: |
mkdir -p test_folder
echo "sample.txt" > test_folder/sample.txt
python main.py test_folder
- name: Run Test
run: |
pip install pytest
pytest test/tests.py