diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5b3d71a..467844c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - dev jobs: build: @@ -13,6 +14,15 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Setup Python and run pylint + run: | + if [ ! -d "venv" ]; then + python3 -m venv venv + fi + . ./venv/bin/activate + pip install -r requirements.txt + pylint --fail-under=5 app/ + - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -48,7 +58,7 @@ jobs: DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ${{ secrets.DOCKER_USERNAME }}/devops360-app:latest) echo "digest=$DIGEST" >> $GITHUB_OUTPUT - - name: Install cosign + - name: Install cosign×– uses: sigstore/cosign-installer@v3.4.0 - name: Write cosign.key to disk diff --git a/requirements.txt b/requirements.txt index d103451..1c8b465 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,3 +31,4 @@ typing_extensions==4.14.0 urllib3==2.5.0 uvicorn==0.34.3 yarg==0.1.10 +pylint==3.3.8 \ No newline at end of file