forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 8
69 lines (60 loc) · 2.39 KB
/
check_make_vtadmin_authz_testgen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: check_make_vtadmin_authz_testgen
on: [push, pull_request]
jobs:
build:
name: Check Make vtadmin_authz_testgen
runs-on: ubuntu-latest
steps:
- name: Check if workflow needs to be skipped
id: skip-workflow
run: |
skip='false'
if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then
skip='true'
fi
echo Skip ${skip}
echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT
- name: Check out code
if: steps.skip-workflow.outputs.skip-workflow == 'false'
uses: actions/checkout@v3
- name: Check for changes in relevant files
if: steps.skip-workflow.outputs.skip-workflow == 'false'
uses: frouioui/paths-filter@main
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@v3
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true'
with:
go-version: 1.18.9
- name: Tune the OS
if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true'
run: |
echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range
- 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