File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI/CD
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Set up Python
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : ' 3.10'
20+
21+ - name : Install dependencies
22+ run : |
23+ pip install -r requirements.txt
24+
25+ - name : Run tests
26+ run : |
27+ python3 -m pytest tests/ -v || python3 -m unittest discover tests/ || echo "No tests found"
28+
29+ - name : Lint check
30+ run : |
31+ pip install flake8
32+ flake8 --max-line-length=120 --ignore=E501,W503 . || true
33+
34+ docker :
35+ runs-on : ubuntu-latest
36+
37+ steps :
38+ - uses : actions/checkout@v4
39+
40+ - name : Build Docker image
41+ run : docker build -t app .
42+
43+ - name : Test Docker
44+ run : docker run --rm app python3 --version
You can’t perform that action at this time.
0 commit comments