Skip to content

Update ci.yaml

Update ci.yaml #27

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout backend
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: autoformatter
run: pip install autopep8
- name: autopep8
run: autopep8 --in-place --recursive . --exclude ./test
- name: add commit
run: |
git config --global user.name 'GitHub Actions Bot'
git config --global user.email '[email protected]'
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "autopep8"
- name: run tests
run: |
cd test
pytest . -v
- name: push changes
run: git push