Flake8 linter added #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:16 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: solo6755 | |
POSTGRES_DB: postgres | |
ports: | |
- 5433:5432 # Expose PostgreSQL on the port you're using | |
options: >- | |
--health-cmd "pg_isready -U postgres" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
DATABASE_URL: postgres://postgres:solo6755@postgres:5432/postgres | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
FERNET_KEY: ${{ secrets.FERNET_KEY }} | |
FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: 'true' | |
steps: | |
# Checkout the code from the repository | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
# Install docker-compose | |
- name: Install docker-compose | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y docker-compose | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install -r requirements.txt | |
# Install Flake8 | |
- name: Install dependencies | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install flake8 | |
- name: Lint with Flake8 | |
run: | | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |