diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index aa3b9cb0..7036a55e 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -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