🔧 chore(ci.yml): update Docker commands to use 'docker compose' instead of 'docker-compose' for consistency and future compatibility
This commit is contained in:
parent
986b4696cd
commit
cc8cd8bef0
1 changed files with 2 additions and 23 deletions
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue