Skip to content

Update workflows

Update workflows #14

Workflow file for this run

name: Check project in all branches
on:
workflow_call:
push:
branches-ignore:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
POSTGRES_USER: inclusive_dance
POSTGRES_PASSWORD: 3d88lacj9327s
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: inclusive_dance_bot
jobs:
checking:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: make develop
- name: Run flake8
run: make flake
- name: Run black
run: make black
- name: Run bandit
run: make bandit
- name: Run mypy
run: make mypy
test:
name: Run service tests with pytest
runs-on: ubuntu-22.04
container: python:3.11
needs: checking
services:
postgres:
image: postgres:15
env:
TZ: UTC
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: make develop
- name: Run pytest
run: make test-ci