Skip to content

Commit

Permalink
Create github-actions.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Pankey authored Feb 8, 2024
1 parent 5d796da commit a3da010
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on: push

jobs:
build:

runs-on: ubuntu-latest

services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: github_actions
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5


steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install pip==19.3.1
#pip install --force-reinstall 'setuptools<58.0.0'
#pip install -r requirements.txt
#pip install -r requirements-toil.txt
pip install -r requirements-dev.txt
#python manage.py migrate
- name: Run migrations
run: python manage.py migrate
- name: Run test
#run: python manage.py test
run: |
coverage run --source='.' manage.py test
coverage report -m --fail-under=75
#- name: Run flake8
#uses: suo/flake8-github-action@releases/v1
# with:
# checkName: 'build' # NOTE: this needs to be the same as the job name

0 comments on commit a3da010

Please sign in to comment.