Skip to content

Commit

Permalink
Update python-app.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuyib authored Nov 29, 2024
1 parent 56f8503 commit f245697
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,28 @@ name: CI/CD
on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
- name: Run Black Linter
run: |
black --check .
build-and-test:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -28,7 +49,12 @@ jobs:
- name: Install dependencies
run: make install


- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
docker-build:
needs: build-and-test
runs-on: ubuntu-latest
Expand All @@ -45,15 +71,15 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Build Docker images
timeout-minutes: 5
env:
AT_USERNAME: ${{ secrets.AT_USERNAME }}
AT_API_KEY: ${{ secrets.AT_API_KEY }}
run: |
make docker_run
- name: Check build status
run: |
if [ "$(docker ps -q)" ]; then
Expand All @@ -62,7 +88,7 @@ jobs:
echo "No containers running"
exit 1
fi
- name: Cleanup Docker resources
if: always()
timeout-minutes: 5
Expand Down

0 comments on commit f245697

Please sign in to comment.