Skip to content

confirm DCM communication changes #265

confirm DCM communication changes

confirm DCM communication changes #265

Workflow file for this run

name: Python application
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
working-directory: ./DCM_group9
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
working-directory: ./DCM_group9
run: |
# Stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Grant execute permission to the script
working-directory: ./DCM_group9/scripts
run: |
chmod +x run_tests.sh
- name: Test with pytest
working-directory: .
run: |
./DCM_group9/scripts/run_tests.sh # pytest
format:
name: Black Python Formatter
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install Black
run: pip install black
- name: Run Black Formatter
run: black .
- name: Check for changes
id: check_changes
run: echo ::set-output name=changed::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
- name: Set up Git and Commit Changes
run: |
git config --local user.name "Polishing homie [BOT]"
git add .
git commit -m "Polishing homie has auto-formatted da code! 🧹🌟🤖"
git push
if: steps.check_changes.outputs.changed != ''
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
debug:
name: Debugging Information
runs-on: ubuntu-latest
steps:
- name: Display Environment Variables
run: env