mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-24 09:13:57 +01:00
6b6662420f
Co-authored-by: Markos Gogoulos <markos@orfium.com>
39 lines
897 B
YAML
39 lines
897 B
YAML
name: Python Tests
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Build the Stack
|
|
run: docker-compose -f docker-compose-dev.yaml build
|
|
|
|
- name: Start containers
|
|
run: docker-compose -f docker-compose-dev.yaml up -d
|
|
|
|
- name: List containers
|
|
run: docker ps
|
|
|
|
- name: Sleep for 60 seconds
|
|
run: sleep 60s
|
|
shell: bash
|
|
|
|
- name: Run Django Tests
|
|
run: docker-compose -f docker-compose-dev.yaml exec --env TESTING=True -T web pytest
|
|
|
|
# Run with coverage, saves report on htmlcov dir
|
|
# run: docker-compose -f docker-compose-dev.yaml exec --env TESTING=True -T web pytest --cov --cov-report=html --cov-config=.coveragerc
|
|
|
|
- name: Tear down the Stack
|
|
run: docker-compose -f docker-compose-dev.yaml down
|