From f65e91fe2253d6711f2c9427fdb9f7d8e6a9251a Mon Sep 17 00:00:00 2001 From: evelynmitchell Date: Mon, 4 Dec 2023 09:43:27 -0700 Subject: [PATCH] docker-compose --- .github/workflows/docker-compose.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/docker-compose.yml diff --git a/.github/workflows/docker-compose.yml b/.github/workflows/docker-compose.yml new file mode 100644 index 00000000..6ab06b97 --- /dev/null +++ b/.github/workflows/docker-compose.yml @@ -0,0 +1,40 @@ +--- +# This is a github action to run docker-compose +# docker-compose.yml +# to run the docker build in the top level directory +# to run the docker build in the tests directory and run the tests with pytest +# docker-compose run --rm app pytest +on: + push: + branches: [ main ] + paths: + - 'docker-compose.yml' + - 'Dockerfile' + - 'tests/**' + - 'app/**' + - 'app.py' + - 'requirements.txt' + - 'README.md' + - '.github/workflows/**' + - '.github/workflows/docker-compose.yml' + - '.github/workflows/main.yml' + - '.github/workflows/python-app.yml' + - '.github/workflows/python-app.yml' + - '.github/workflows' + +name: Docker Compose + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Add your build and test steps here + + - name: Build and run docker services + run: | + docker-compose build + docker-compose up -d + docker-compose run --rm app pytest