You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
---
|
|
|
|
# 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@v4
|
|
|
|
|
|
|
|
# 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
|