test Docker Compose deployment #38
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: test Docker Compose deployment | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
schedule: # Run daily at midnight | |
- cron: '0 0 * * *' | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Docker Compose | |
uses: KengoTODA/actions-setup-docker-compose@v1 | |
with: | |
version: '2.14.2' | |
- name: Start Docker containers | |
run: docker-compose -f ./docker-compose/docker-compose.yaml up -d | |
working-directory: ${{ github.workspace }} | |
- name: Wait for services to boot | |
run: sleep 120s | |
- name: Test endpoint 7001 | |
run: curl -s http://localhost:7001 | |
id: test_7001 | |
- name: Test endpoint 7002 | |
run: curl -s http://localhost:7002 | |
id: test_7002 | |
- name: Test endpoint 7003 | |
run: curl -s http://localhost:7003 | |
id: test_7003 | |
- name: Check endpoint results | |
run: | | |
echo "Endpoint 7001 status: ${{ steps.test_7001.outputs.stdout }}" | |
echo "Endpoint 7002 status: ${{ steps.test_7002.outputs.stdout }}" | |
echo "Endpoint 7003 status: ${{ steps.test_7003.outputs.stdout }}" |