testing actions commit #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu Testing | |
on: | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
molehole_testing_ubuntu_server: | |
image: molehole_testing_ubuntu_server | |
ports: | |
- 80:80 | |
options: >- | |
--network molehole_local_network | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker | |
run: | | |
docker-compose -f docker-compose.yml up -d | |
- name: Copy .env.example to .env | |
run: | | |
docker exec -it molehole_testing_ubuntu_server cp /app/.env.example /app/.env | |
- name: Install dependencies and build the application | |
run: | | |
docker exec -it molehole_testing_ubuntu_server sh -c "pip install -r /app/requirements.txt && pyinstaller /app/server.spec" | |
- name: Run tests | |
run: | | |
docker exec -it molehole_testing_ubuntu_server pytest /app/tests --disable-warnings | |
- name: Clean up | |
run: docker-compose -f docker-compose.yml down |