Skip to content

Move test demo apps out of Bazel to ease Go version deprecation and support testing offsetgen instrumentation #2975

Move test demo apps out of Bazel to ease Go version deprecation and support testing offsetgen instrumentation

Move test demo apps out of Bazel to ease Go version deprecation and support testing offsetgen instrumentation #2975

Workflow file for this run

---
name: pr-genfile-checker
on:
pull_request
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
get-dev-image:
uses: ./.github/workflows/get_image.yaml
with:
image-base-name: "dev_image"
run-genfiles:
runs-on: oracle-8cpu-32gb-x86-64
needs: get-dev-image
container:
image: ${{ needs.get-dev-image.outputs.image-with-tag }}
options: --cpus 7
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: go cache
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: /px/pkg/mod
key: go-cache-${{ hashFiles('go.sum') }}
restore-keys: |
go-cache-
- name: yarn cache
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: ./src/ui/.yarn/cache
key: yarn-cache-${{ hashFiles('src/ui/yarn.lock', 'src/ui/.yarnrc.yml') }}
restore-keys: |
yarn-cache-
- name: Add pwd to git safe dir
run: git config --global --add safe.directory `pwd`
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
go:
- '**/*.go'
graphql:
- '**/*.graphql'
proto:
- '**/*.proto'
sql:
- '**/*.sql'
gobuild:
- '**/*.BUILD'
- 'go.mod'
- name: Run go generate
if: ${{ steps.changes.outputs.go == 'true' || steps.changes.outputs.sql == 'true' }}
run: go generate ./...
- name: Run update go protos
if: ${{ steps.changes.outputs.proto == 'true' }}
run: scripts/update_go_protos.sh
- name: Run update ts protos
if: ${{ steps.changes.outputs.proto == 'true' }}
run: scripts/update_ts_protos.sh
- name: Run update graphql schema
if: ${{ steps.changes.outputs.graphql == 'true' }}
run: src/cloud/api/controllers/schema/update.sh
- name: Run make go-setup
if: ${{ steps.changes.outputs.go == 'true' || steps.changes.outputs.gobuild == 'true' }}
run: make go-setup
- name: Fail if any files changed
shell: bash
run: |
if [[ $(git status --porcelain=v1 | wc -l) -ne 0 ]]; then
echo "Please update generated files by running the appropriate script."
echo "Changed files:"
git diff --name-only
exit 1
fi