Skip to content

use test/.env inside docker container #54

use test/.env inside docker container

use test/.env inside docker container #54

Workflow file for this run

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"