Skip to content

remove tile interactions #63

remove tile interactions

remove tile interactions #63

name: "Validate Metrics"
on:
pull_request:
branches:
- main
paths:
- 'definitions/**'
push:
branches:
- main
paths:
- 'definitions/**'
jobs:
changed:
uses: ./.github/workflows/changed-files.yml
with:
path_filter: |
definitions/*.toml
definitions/*.toml.example
validate-metrics:
runs-on: ubuntu-latest
needs: changed
permissions:
id-token: write
contents: read
if: needs.changed.outputs.any_changed == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
- name: Build
run: |
python3 -m pip install -r .script/requirements.txt
python3 -m pip install lib/metric-config-parser
- name: Authenticate to GCP
uses: google-github-actions/auth@v2
id: auth
with:
workload_identity_provider: ${{ vars.GCPV2_GITHUB_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_DRYRUN_SERVICE_ACCOUNT_EMAIL }}
token_format: id_token
id_token_audience: https://us-central1-moz-fx-data-shared-prod.cloudfunctions.net/bigquery-etl-dryrun
id_token_include_email: true
- name: Export ID Token for Python
env:
GOOGLE_GHA_ID_TOKEN: ${{ steps.auth.outputs.id_token }}
run: echo "GOOGLE_GHA_ID_TOKEN=$GOOGLE_GHA_ID_TOKEN" >> $GITHUB_ENV
- name: Validate metric config files
env:
ALL_CHANGED_FILES: ${{ needs.changed.outputs.all_changed_files }}
run: |
echo "Run validation on changed files: "
echo $ALL_CHANGED_FILES
python3 .script/validate.py --config_repos='.' $ALL_CHANGED_FILES