use test/.env inside docker container #54
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: Docker Image CI and pytest test. | |
# This workflow is only triggered when This workflow will install Python dependencies, run tests and pre-commit hook with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
on: | |
push: | |
paths: | |
- '.github/workflows/docker-image.yml' | |
# branches: | |
# - "develop" | |
jobs: | |
built: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build the Docker image | |
run: docker build --tag ai4eu_server_demo:latest -f Dockerfile . | |
- name: Run Docker container and pytest tests | |
run: | | |
docker run -e KEYCLOAK_CLIENT_SECRET="mocked_secret" --entrypoint "" ai4eu_server_demo sh -c "pip install \".[dev]\" && pytest --envfile test/.env tests -s" | |