Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 40 additions & 14 deletions .github/workflows/api-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
api-lint:
name: Run Lint (API)
if: ${{ inputs.skip == false }}
uses: codecov/gha-workflows/.github/workflows/lint.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/lint.yml@v1.2.36
with:
working_directory: apps/codecov-api
make_target_prefix: api.

api-mypy:
name: Patch typing (API)
Expand All @@ -28,72 +28,98 @@ jobs:
with:
working_directory: apps/codecov-api

# Once we cut over to umbrella, we can just replace the default cache key in build-app.yml
# and self-hosted.yml and get rid of this step.
api-compute-reqs-cache-key:
name: Compute cache key for requirements image
runs-on: ubuntu-latest
outputs:
reqs-cache-key: ${{ steps.compute.outputs.cache-key }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- id: compute
run: |
echo cache-key=${{ hashFiles('apps/codecov-api/uv.lock') }}-${{ hashFiles('docker/Dockerfile.requirements') }}-${{ hashFiles('libs/shared/**') }} >> "$GITHUB_OUTPUT"

api-build:
name: Build App (API)
if: ${{ inputs.skip == false }}
uses: codecov/gha-workflows/.github/workflows/build-app.yml@v1.2.31
needs: [api-compute-reqs-cache-key]
uses: codecov/gha-workflows/.github/workflows/build-app.yml@v1.2.36
secrets: inherit
with:
repo: ${{ vars.CODECOV_API_IMAGE_V2 || vars.CODECOV_API_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-api' }}
working_directory: apps/codecov-api
output_directory: apps/codecov-api
make_target_prefix: api.
reqs_cache_key: ${{ needs.api-compute-reqs-cache-key.outputs.reqs-cache-key }}

api-test:
name: Test (API)
if: ${{ inputs.skip == false }}
needs: [api-build]
uses: codecov/gha-workflows/.github/workflows/run-tests.yml@v1.2.35
uses: codecov/gha-workflows/.github/workflows/run-tests.yml@v1.2.36
secrets: inherit
with:
run_integration: false
repo: ${{ vars.CODECOV_API_IMAGE_V2 || vars.CODECOV_API_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-api' }}
working_directory: apps/codecov-api
output_directory: apps/codecov-api
flag_prefix: api
pytest_rootdir: /app
make_target_prefix: api.

api-build-self-hosted:
name: Build Self Hosted (API)
if: ${{ inputs.skip == false }}
needs: [api-build, api-test]
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.36
secrets: inherit
with:
repo: ${{ vars.CODECOV_API_IMAGE_V2 || vars.CODECOV_API_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-api' }}
working_directory: apps/codecov-api
output_directory: apps/codecov-api
make_target_prefix: api.
reqs_cache_key: ${{ needs.api-compute-reqs-cache-key.outputs.reqs-cache-key }}

api-staging:
name: Push Staging Image (API)
needs: [api-build, api-test]
if: ${{ inputs.skip == false && github.event_name == 'push' && github.event.ref == 'refs/heads/staging' && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.36
secrets: inherit
with:
environment: staging
repo: ${{ vars.CODECOV_API_IMAGE_V2 || vars.CODECOV_API_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-api' }}
working_directory: apps/codecov-api
output_directory: apps/codecov-api
sentry_project: api
make_target_prefix: api.

api-production:
name: Push Production Image (API)
needs: [api-build, api-test]
if: ${{ inputs.skip == false && github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.36
secrets: inherit
with:
environment: production
repo: ${{ vars.CODECOV_API_IMAGE_V2 || vars.CODECOV_API_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-api' }}
working_directory: apps/codecov-api
output_directory: apps/codecov-api
sentry_project: api
make_target_prefix: api.

api-self-hosted:
name: Push Self Hosted Image (API)
needs: [api-build-self-hosted, api-test]
secrets: inherit
if: ${{ inputs.skip == false && github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.36
with:
push_rolling: true
repo: ${{ vars.CODECOV_API_IMAGE_V2 || vars.CODECOV_API_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-api' }}
working_directory: apps/codecov-api
output_directory: apps/codecov-api
make_target_prefix: api.
reqs_cache_key: ${{ needs.api-compute-reqs-cache-key.outputs.reqs-cache-key }}

# This job works around a strange interaction between reusable workflows and
# path filters.
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/shared-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
shared-lint:
name: Run Lint (Shared)
if: ${{ inputs.skip == false }}
uses: codecov/gha-workflows/.github/workflows/lint.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/lint.yml@v1.2.36
with:
working_directory: libs/shared
make_target_prefix: shared.

shared-benchmark:
name: Benchmarks (Shared)
Expand Down Expand Up @@ -138,7 +138,6 @@ jobs:
# The coverage action will have installed codecovcli with pip. The
# actual binary will be found in $PATH.
binary: codecovcli
recurse_submodules: true

# This job works around a strange interaction between reusable workflows and
# path filters.
Expand Down
58 changes: 42 additions & 16 deletions .github/workflows/worker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Worker CI

on:
workflow_call:
inputs:
inputs:
skip:
type: boolean
default: false
Expand All @@ -17,9 +17,9 @@ jobs:
worker-lint:
name: Run Lint (Worker)
if: ${{ inputs.skip == false }}
uses: codecov/gha-workflows/.github/workflows/lint.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/lint.yml@v1.2.36
with:
working_directory: apps/worker
make_target_prefix: worker.

worker-mypy:
name: Patch typing (Worker)
Expand All @@ -28,71 +28,97 @@ jobs:
with:
working_directory: apps/worker

# Once we cut over to umbrella, we can just replace the default cache key in build-app.yml
# and self-hosted.yml and get rid of this step.
worker-compute-reqs-cache-key:
name: Compute cache key for requirements image
runs-on: ubuntu-latest
outputs:
reqs-cache-key: ${{ steps.compute.outputs.cache-key }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- id: compute
run: |
echo cache-key=${{ hashFiles('apps/worker/uv.lock') }}-${{ hashFiles('docker/Dockerfile.requirements') }}-${{ hashFiles('libs/shared/**') }} >> "$GITHUB_OUTPUT"

worker-build:
name: Build App (Worker)
if: ${{ inputs.skip == false }}
uses: codecov/gha-workflows/.github/workflows/build-app.yml@v1.2.31
needs: [worker-compute-reqs-cache-key]
uses: codecov/gha-workflows/.github/workflows/build-app.yml@v1.2.36
secrets: inherit
with:
repo: ${{ vars.CODECOV_WORKER_IMAGE_V2 || vars.CODECOV_WORKER_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-worker' }}
working_directory: apps/worker
output_directory: apps/worker
make_target_prefix: worker.
reqs_cache_key: ${{ needs.worker-compute-reqs-cache-key.outputs.reqs-cache-key }}

worker-test:
name: Test (Worker)
if: ${{ inputs.skip == false }}
needs: [worker-build]
uses: codecov/gha-workflows/.github/workflows/run-tests.yml@v1.2.35
uses: codecov/gha-workflows/.github/workflows/run-tests.yml@v1.2.36
secrets: inherit
with:
repo: ${{ vars.CODECOV_WORKER_IMAGE_V2 || vars.CODECOV_WORKER_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-worker' }}
working_directory: apps/worker
output_directory: apps/worker
flag_prefix: worker
pytest_rootdir: /app
make_target_prefix: worker.

worker-build-self-hosted:
name: Build Self Hosted (Worker)
if: ${{ inputs.skip == false }}
needs: [worker-build, worker-test]
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.36
secrets: inherit
with:
repo: ${{ vars.CODECOV_WORKER_IMAGE_V2 || vars.CODECOV_WORKER_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-worker' }}
working_directory: apps/worker
output_directory: apps/worker
make_target_prefix: worker.
reqs_cache_key: ${{ needs.worker-compute-reqs-cache-key.outputs.reqs-cache-key }}

worker-staging:
name: Push Staging Image (Worker)
needs: [worker-build, worker-test]
if: ${{ inputs.skip == false && github.event_name == 'push' && (github.event.ref == 'refs/heads/main' || github.event.ref == 'refs/heads/staging') && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.36
secrets: inherit
with:
environment: staging
repo: ${{ vars.CODECOV_WORKER_IMAGE_V2 || vars.CODECOV_WORKER_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-worker' }}
working_directory: apps/worker
output_directory: apps/worker
sentry_project: worker
make_target_prefix: worker.

worker-production:
name: Push Production Image (Worker)
needs: [worker-build, worker-test]
if: ${{ inputs.skip == false && github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/push-env.yml@v1.2.36
secrets: inherit
with:
environment: production
repo: ${{ vars.CODECOV_WORKER_IMAGE_V2 || vars.CODECOV_WORKER_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-worker' }}
working_directory: apps/worker
output_directory: apps/worker
sentry_project: worker
make_target_prefix: worker.

worker-self-hosted:
name: Push Self Hosted Image (Worker)
needs: [worker-build-self-hosted, worker-test]
needs: [worker-compute-reqs-cache-key, worker-build-self-hosted, worker-test]
secrets: inherit
if: ${{ inputs.skip == false && github.event_name == 'push' && github.event.ref == 'refs/heads/main' && github.repository_owner == 'codecov' }}
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.31
uses: codecov/gha-workflows/.github/workflows/self-hosted.yml@v1.2.36
with:
push_rolling: true
repo: ${{ vars.CODECOV_WORKER_IMAGE_V2 || vars.CODECOV_WORKER_IMAGE_V2_SELF_HOSTED || 'codecov/self-hosted-worker' }}
working_directory: apps/worker
output_directory: apps/worker
make_target_prefix: worker.
reqs_cache_key: ${{ needs.worker-compute-reqs-cache-key.outputs.reqs-cache-key }}

# This job works around a strange interaction between reusable workflows and
# path filters.
Expand Down
Loading
Loading