🔧 chore(ci.yml): update Docker commands to use 'docker compose' instead of 'docker-compose' for consistency and future compatibility

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-16 00:09:32 -03:00
commit cc8cd8bef0

View file

@ -34,30 +34,9 @@ jobs:
# Step 4: Build Docker containers and start services (e.g., Redis, Celery)
- name: Build and start services
working-directory: ./deploy
run: docker-compose up --build -d
run: docker compose up --exit-code-from tests tests queue celeryworker db -d
continue-on-error: true
- name: Build and run tests
run: |
docker-compose -f docker-compose.yml up --exit-code-from tests tests queue celeryworker db -d
container_id=$(docker ps -a -q --filter "name=tests")
docker cp ${container_id}:/path/in/container/to/test/results ./test-results
- name: Upload test report
if: always()
uses: actions/upload-artifact@v2
with:
name: test-report
path: ./test-results
# Step 6: Capture test results and store as an artifact
- name: Archive test results
if: always()
uses: actions/upload-artifact@v2
with:
name: test-results
path: path/to/your/test-results/ # Update this to where pytest stores test results
# Step 7: Cleanup - Stop and remove Docker containers
- name: Stop services
run: docker-compose down
run: docker compose down