feat: wip of github workflows #1
Workflow file for this run
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: Backend CI | ||
on: | ||
pull_request_target: | ||
types: [opened, edited, closed] | ||
branches: [main, develop] | ||
jobs: | ||
backend-ci: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./backend | ||
strategy: | ||
matrix: | ||
python-version: [3.11.x] | ||
steps: | ||
- name: Checkout to git repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install project dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install --with dev | ||
- name: Run unit tests | ||
run: poetry run python -m pytest tests/ | ||
- name: Run linter and formatter | ||
run: | | ||
poetry run black . | ||
poetry run flake8 |