2021-06-17 22:11:14 +02:00
|
|
|
name: Python Tests
|
|
|
|
|
2021-07-01 17:05:43 +02:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-06-17 22:11:14 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2021-07-01 17:05:43 +02:00
|
|
|
- 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 -T web pytest
|
|
|
|
|
|
|
|
- name: Tear down the Stack
|
|
|
|
run: docker-compose -f docker-compose-dev.yaml down
|