Skip to content

Commit

Permalink
feat(devservices): Add devservices config validation job (#4426)
Browse files Browse the repository at this point in the history
This validation job will only run if files are changed in the
devservices/ directory or the .github/workflows/ci.yml has been changed.
It will ensure that the config files that live in the relay devservices
directory actually work, preventing potential breakages for devservices
across repos that depend on snuba if invalid configs are merged.

Composite action used:
https://github.com/getsentry/action-validate-devservices-config

#skip-changelog
  • Loading branch information
hubertdeng123 authored Jan 7, 2025
1 parent f330be2 commit a93763a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ jobs:
- name: Run Clippy
run: cargo clippy --workspace --all-targets --no-deps -- -D warnings

devservices-files-changed:
name: detect what files changed
runs-on: ubuntu-24.04
timeout-minutes: 3
outputs:
devservices-files-changed: ${{ steps.changes.outputs.devservices-files-changed }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
name: Check for file changes
id: changes
with:
token: ${{ github.token }}
filters: |
devservices-files-changed:
- 'devservices/**'
- '.github/workflows/ci.yml'
test:
timeout-minutes: 20
strategy:
Expand Down Expand Up @@ -628,3 +646,15 @@ jobs:
image_url: ghcr.io/getsentry/relay:${{ github.event.pull_request.head.sha || github.sha }}
docker_repo: getsentry/relay
docker_password: ${{ secrets.DOCKER_HUB_RW_TOKEN }}

validate-devservices-config:
runs-on: ubuntu-24.04
needs: devservices-files-changed
if: ${{ needs.devservices-files-changed.outputs.devservices-files-changed == 'true' }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
name: Checkout repository
- uses: getsentry/action-validate-devservices-config@6477ef1e9c96e456bfad726006e731f89fcd81db
name: Validate devservices config
with:
requirements-file-path: requirements-dev.txt

0 comments on commit a93763a

Please sign in to comment.