Skip to content

Commit f245697

Browse files
authored
Update python-app.yml
1 parent 56f8503 commit f245697

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

.github/workflows/python-app.yml

+30-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,28 @@ name: CI/CD
33
on: [push, pull_request]
44

55
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v3
11+
12+
- name: Set up Python 3.12
13+
uses: actions/setup-python@v3
14+
with:
15+
python-version: '3.12'
16+
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install black
21+
22+
- name: Run Black Linter
23+
run: |
24+
black --check .
25+
626
build-and-test:
27+
needs: lint
728
runs-on: ubuntu-latest
829
strategy:
930
matrix:
@@ -28,7 +49,12 @@ jobs:
2849
2950
- name: Install dependencies
3051
run: make install
31-
52+
53+
- name: Install Docker Compose
54+
run: |
55+
sudo apt-get update
56+
sudo apt-get install -y docker-compose
57+
3258
docker-build:
3359
needs: build-and-test
3460
runs-on: ubuntu-latest
@@ -45,15 +71,15 @@ jobs:
4571
run: |
4672
sudo apt-get update
4773
sudo apt-get install -y docker-compose
48-
74+
4975
- name: Build Docker images
5076
timeout-minutes: 5
5177
env:
5278
AT_USERNAME: ${{ secrets.AT_USERNAME }}
5379
AT_API_KEY: ${{ secrets.AT_API_KEY }}
5480
run: |
5581
make docker_run
56-
82+
5783
- name: Check build status
5884
run: |
5985
if [ "$(docker ps -q)" ]; then
@@ -62,7 +88,7 @@ jobs:
6288
echo "No containers running"
6389
exit 1
6490
fi
65-
91+
6692
- name: Cleanup Docker resources
6793
if: always()
6894
timeout-minutes: 5

0 commit comments

Comments
 (0)