Skip to content

Commit

Permalink
pipline docker-compose new verion
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan-g committed Aug 18, 2024
1 parent 5394d56 commit ab3755f
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,48 +105,48 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
# run-tests:
# name: Run Tests
# timeout-minutes: 10
# runs-on: ubuntu-latest
# needs: build_and_push
# env:
# IMAGE_ID: ${{ needs.build_and_push.outputs.test_image_id }}
# outputs:
# image_id: ${{ needs.build_and_push.outputs.image_id }}
# steps:
# - name: Git Checkout
# uses: actions/checkout@v2

# - name: Get Ref Name
# run: echo "REF=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV

# - name: Build Compose File
# run: >
# CONTAINER_IMAGE=${IMAGE_ID}
# docker-compose
# -f docker-compose.yml
# -f docker-compose-dev.yml
# config > compose.yml

# - name: Pull Images
# run: docker-compose -f compose.yml pull

# - name: Run Tests
# run: >
# docker-compose -f compose.yml
# run --rm backend pytest -vvv --cov=./ --cov-report=xml

# # - name: Upload coverage to Codecov
# # uses: codecov/codecov-action@v2
# # with:
# # directory: ./coverage/reports/
# # env_vars: OS,PYTHON
# # fail_ci_if_error: true
# # files: ./coverage.xml
# # flags: pytest
# # name: say-codecov
# # verbose: true
run-tests:
name: Run Tests
timeout-minutes: 10
runs-on: ubuntu-latest
needs: build_and_push
env:
IMAGE_ID: ${{ needs.build_and_push.outputs.test_image_id }}
outputs:
image_id: ${{ needs.build_and_push.outputs.image_id }}
steps:
- name: Git Checkout
uses: actions/checkout@v2

- name: Get Ref Name
run: echo "REF=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV

- name: Build Compose File
run: >
CONTAINER_IMAGE=${IMAGE_ID}
docker-compose
-f docker-compose.yml
-f docker-compose-dev.yml
config > compose.yml
- name: Pull Images
run: docker-compose -f compose.yml pull

- name: Run Tests
run: >
docker-compose -f compose.yml
run --rm backend pytest -vvv --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml
flags: pytest
name: say-codecov
verbose: true

deploy_dev:
name: Deploy to Development Server
Expand Down

0 comments on commit ab3755f

Please sign in to comment.