Skip to content

slack-19.0: early backport of vtorc optimizations, pt. 1 #3191

slack-19.0: early backport of vtorc optimizations, pt. 1

slack-19.0: early backport of vtorc optimizations, pt. 1 #3191

name: check_make_vtadmin_authz_testgen
on: [push, pull_request]
permissions: read-all
env:
GOPRIVATE: github.com/slackhq/vitess-addons
GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}"
jobs:
build:
name: Check Make vtadmin_authz_testgen
runs-on: ubuntu-22.04
steps:
- name: Skip CI
run: |
if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then
echo "skipping CI due to the 'Skip CI' label"
exit 1
fi
- name: Check if workflow needs to be skipped
id: skip-workflow
run: |
skip='false'
echo Skip ${skip}
echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT
- name: Check out code
if: steps.skip-workflow.outputs.skip-workflow == 'false'
uses: actions/checkout@v4
- name: Check for changes in relevant files
if: steps.skip-workflow.outputs.skip-workflow == 'false'
uses: dorny/[email protected]
id: changes
with:
token: ''
filters: |
vtadmin_changes:
- 'bootstrap.sh'
- 'tools/**'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'Makefile'
- 'go/vt/vtadmin/**'
- '.github/workflows/check_make_vtadmin_authz_testgen.yml'
- name: Set up Go
uses: actions/setup-go@v5
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true'
with:
go-version: 1.22.5
- name: Setup github.com/slackhq/vitess-addons access token
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true'
run: git config --global url.https://[email protected]/.insteadOf https://github.com/
- name: Tune the OS
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true'
run: |
sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535"
- name: Get dependencies
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true'
run: |
sudo apt-get update
sudo apt-get install -y make unzip g++ etcd curl git wget
sudo service etcd stop
go mod download
go install golang.org/x/tools/cmd/goimports@latest
- name: Run make minimaltools
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true'
run: |
make minimaltools
- name: check_make_vtadmin_authz_testgen
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true'
run: |
tools/check_make_vtadmin_authz_testgen.sh