diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..165f6e0 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,34 @@ +name: Check Code Quality + +on: + push: + branches: [ "*" ] + paths: + - "project/*" + + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ 3.12 ] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install black ruff + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Run Black + run: black --check project + + - name: Run Ruff + run: ruff check project \ No newline at end of file diff --git a/.github/workflows/elastic-beanstalk-deploy-prod.yaml b/.github/workflows/elastic-beanstalk-deploy-prod.yaml index 94ed62a..5e63dc9 100644 --- a/.github/workflows/elastic-beanstalk-deploy-prod.yaml +++ b/.github/workflows/elastic-beanstalk-deploy-prod.yaml @@ -1,4 +1,4 @@ -name: Deploy to AWS Elastic Beanstalk Dev +name: Deploy to AWS Elastic Beanstalk Production on: push: @@ -27,10 +27,11 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Run Black - run: black --check web/project + run: black --check project - name: Run Ruff - run: ruff check web/project + run: ruff check project + deploy: runs-on: ubuntu-latest