Removed mongo volume for tests (#8) #89
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python application | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare workspace | |
run: cp ./tests/ci_files/.env.test .env && cp ./tests/ci_files/queries.test.json queries.json && cp ./tests/ci_files/medallion_config.test.json medallion_config.json | |
- name: Build the docker image | |
run: docker compose build taxii_integration | |
- name: Run linter and test suite | |
run: | |
docker network create datalake-taxii && docker compose up -d -V nginx_proxy && docker compose run --entrypoint "python main.py --init" taxii_integration && docker compose restart medallion && docker compose run --entrypoint=sh taxii_integration -c " | |
python -m flake8 . --count --max-complexity=10 --max-line-length=120 --show-source --statistics | |
&& python -m pytest -s | |
" |