Skip to content

build & test

build & test #63

Workflow file for this run

name: Build and test
run-name: build & test
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CICD: true
# HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
# HEROKU_APP_NAME: your-heroku-app-name
jobs:
container-job:
runs-on: ubuntu-latest
container: python:3.11.3-bullseye # node:10.18-jessie
services:
db:
# container_name: tournament-db
image: postgres:14-bullseye
env:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: tournament_db
POSTGRES_PASSWORD: 123456
PGPASSWORD: 123456
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: checkout project
uses: actions/checkout@v3
# - name: Set up Python 3.11.4
# uses: actions/setup-python@v4
# with:
# python-version: 3.11.4
- name: Install dependencies
run: pip install -r requirements.txt
# run: |
# #python -m pip install --upgrade pip
# pip install -r requirements.txt
- name: Run migrations
run: python manage.py makemigrations && python manage.py migrate
env:
POSTGRES_USER: postgres
POSTGRES_DB: tournament_db
POSTGRES_PASSWORD: 123456
PGPASSWORD: 123456
POSTGRES_PORT: 5432
- name: Run tests
run: python manage.py test eliminationtournaments