Changed github action #2
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: Build Docker Container and test HTTP | |
on: [push] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and run the Docker containers | |
run: docker-compose up --build -d --wait | |
- name: Test the web service | |
run: | | |
echo "Testing the web service..." | |
curl --fail http://localhost:5000 || exit 1 | |
- name: Stop and remove the Docker containers | |
run: docker-compose down |