Skip to content

chore: remove all of the workflow args used for cutover #5

chore: remove all of the workflow args used for cutover

chore: remove all of the workflow args used for cutover #5

Workflow file for this run

name: Run Tests
on:
workflow_call:
inputs:
run_integration:
required: false
type: boolean
default: true
repo:
type: string
required: true
outputs:
tests_passed:
# Silly issue with returning job results as workflow outputs
# https://github.com/actions/runner/issues/2495
value: ${{ fromJSON(toJSON(jobs.test)).result }}
env:
AR_REPO: ${{ inputs.repo }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Cache App
id: cache-app
uses: actions/cache@v4
env:
cache-name: ${{ inputs.repo }}-app
with:
path: |
app.tar
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.run_id }}
- name: Load built image
run: |
docker load --input app.tar
- name: Install docker compose
run: |
sudo curl -SL https://github.com/docker/compose/releases/download/v2.20.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Bring test env up
run: |
make test_env.up
- name: Prepare for tests
run: |
make test_env.prepare
make test_env.check_db
- name: Run unit tests
run: |
make test_env.run_unit
- name: Run integration tests
if: ${{ !cancelled() && inputs.run_integration == true }}
run: |
make test_env.run_integration
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: coveragefiles
path: *.coverage.xml

Check failure on line 67 in .github/workflows/run-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/run-tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 67
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: junitfiles
path: *junit*.xml
upload:
name: Upload to Codecov
runs-on: ubuntu-latest
needs: [test]
strategy:
matrix:
include:
- codecov_url_secret: CODECOV_URL
codecov_token_secret: CODECOV_ORG_TOKEN
name: prod
- codecov_url_secret: CODECOV_STAGING_URL
codecov_token_secret: CODECOV_ORG_TOKEN_STAGING
name: staging
- codecov_url_secret: CODECOV_QA_URL
codecov_token_secret: CODECOV_QA_ORG
name: qa
- codecov_url_secret: CODECOV_PUBLIC_QA_URL
codecov_token_secret: CODECOV_PUBLIC_QA_TOKEN
name: public qa
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Download coverage
id: download_coverage
uses: actions/download-artifact@v4
with:
name: coveragefiles
- name: Download test results
id: download_test_results
uses: actions/download-artifact@v4
with:
name: junitfiles
- name: Uploading unit test coverage (${{ matrix.name }})
uses: codecov/codecov-action@v5
with:
files: ${{ steps.download_coverage.outputs.download-path }}/unit.coverage.xml
flags: unit
disable_search: true
# Strange workaround: API has a `codecov` directory in the repo root
# which conflicts with the action's `codecov` binary
use_pypi: true
token: ${{ secrets[matrix.codecov_token_secret] }}
url: ${{ secrets[matrix.codecov_url_secret] }}
recurse_submodules: true
- name: Uploading integration test coverage (${{ matrix.name }})
if: ${{ inputs.run_integration == true }}
uses: codecov/codecov-action@v5
with:
files: ${{ steps.download_coverage.outputs.download-path }}/integration.coverage.xml
flags: integration
disable_search: true
# Strange workaround: API has a `codecov` directory in the repo root
# which conflicts with the action's `codecov` binary
use_pypi: true
token: ${{ secrets[matrix.codecov_token_secret] }}
url: ${{ secrets[matrix.codecov_url_secret] }}
recurse_submodules: true
- name: Uploading unit test results (${{ matrix.name }})
uses: codecov/test-results-action@v1
with:
files: ${{ steps.download_test_results.outputs.download-path }}/unit.junit.xml
flags: unit
disable_search: true
token: ${{ secrets[matrix.codecov_token_secret] }}
url: ${{ secrets[matrix.codecov_url_secret] }}
# The coverage action will have installed codecovcli with pip. The
# actual binary will be found in $PATH.
binary: codecovcli
- name: Uploading integration test results (${{ matrix.name }})
if: ${{ inputs.run_integration == true }}
uses: codecov/test-results-action@v1
with:
files: ${{ steps.download_test_results.outputs.download-path }}/integration.junit.xml
flags: integration
disable_search: true
token: ${{ secrets[matrix.codecov_token_secret] }}
url: ${{ secrets[matrix.codecov_url_secret] }}
# The coverage action will have installed codecovcli with pip. The
# actual binary will be found in $PATH.
binary: codecovcli