Skip to content

Commit

Permalink
Use paths filtering on more CI workflows (vitessio#4586)
Browse files Browse the repository at this point in the history
* skip workflows

Signed-off-by: Florent Poinsard <[email protected]>

* fix wrong go version

Signed-off-by: Florent Poinsard <[email protected]>

* re-gen workflows

Signed-off-by: Florent Poinsard <[email protected]>

* Remove old workflows

Signed-off-by: Florent Poinsard <[email protected]>

* Update to checkout@v4

Signed-off-by: Florent Poinsard <[email protected]>

---------

Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui committed Mar 26, 2024
1 parent ecc36ad commit 0201ac7
Show file tree
Hide file tree
Showing 67 changed files with 1,857 additions and 185 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/check_make_vtadmin_authz_testgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,38 @@ jobs:
run: |
git config --global --add url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Check out code
uses: actions/checkout@v4

- name: Check for changes in relevant files
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
if: steps.changes.outputs.vtadmin_changes == 'true'
uses: actions/setup-go@v5
with:
go-version: 1.21.7

- name: Check out code
uses: actions/checkout@v4

- name: Tune the OS
if: steps.changes.outputs.vtadmin_changes == 'true'
run: |
sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535"
- name: Get dependencies
if: steps.changes.outputs.vtadmin_changes == 'true'
run: |
sudo apt-get update
sudo apt-get install -y make unzip g++ etcd curl git wget
Expand All @@ -33,9 +52,11 @@ jobs:
go install golang.org/x/tools/cmd/goimports@latest
- name: Run make minimaltools
if: steps.changes.outputs.vtadmin_changes == 'true'
run: |
make minimaltools
- name: check_make_vtadmin_authz_testgen
if: steps.changes.outputs.vtadmin_changes == 'true'
run: |
tools/check_make_vtadmin_authz_testgen.sh
28 changes: 25 additions & 3 deletions .github/workflows/check_make_vtadmin_web_proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,46 @@ jobs:
run: |
git config --global --add url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Check out code
uses: actions/checkout@v4

- name: Check for changes in relevant files
uses: dorny/[email protected]
id: changes
with:
token: ''
filters: |
proto_changes:
- 'bootstrap.sh'
- 'tools/**'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'Makefile'
- 'go/vt/proto/**'
- 'proto/*.proto'
- 'web/vtadmin/src/proto/**'
- '.github/workflows/check_make_vtadmin_web_proto.yml'
- name: Set up Go
if: steps.changes.outputs.proto_changes == 'true'
uses: actions/setup-go@v5
with:
go-version: 1.21.7

- name: Check out code
uses: actions/checkout@v4

- name: Setup Node
if: steps.changes.outputs.proto_changes == 'true'
uses: actions/setup-node@v4
with:
# node-version should match package.json
node-version: '18.16.0'

- name: Install npm dependencies
if: steps.changes.outputs.proto_changes == 'true'
run: npm ci
working-directory: ./web/vtadmin

- name: check_make_vtadmin_web_proto
if: steps.changes.outputs.proto_changes == 'true'
run: |
tools/check_make_vtadmin_web_proto.sh
29 changes: 29 additions & 0 deletions .github/workflows/cluster_endtoend_12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,53 @@ jobs:
run: |
git config --global --add url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Check out code
uses: actions/checkout@v4

- name: Check for changes in relevant files
uses: dorny/[email protected]
id: changes
with:
token: ''
filters: |
end_to_end:
- 'go/**/*.go'
- 'go/vt/sidecardb/**/*.sql'
- 'test.go'
- 'Makefile'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'proto/*.proto'
- 'tools/**'
- 'config/**'
- 'bootstrap.sh'
- '.github/workflows/cluster_endtoend_12.yml'
- name: Set up Go
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@v5
with:
go-version: 1.21.7

- name: Set up python
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-python@v5

- name: Tune the OS
if: steps.changes.outputs.end_to_end == 'true'
run: |
sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535"
# Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio
echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
- name: Check out code
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/checkout@v4

- name: Get dependencies
if: steps.changes.outputs.end_to_end == 'true'
env: # Or as an environment variable
AWS_ACCESS_KEY_ID: ${{ secrets.BUILDKITE_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BUILDKITE_S3_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -70,6 +98,7 @@ jobs:
go mod download
- name: Run cluster endtoend test
if: steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 45
run: |
# We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/cluster_endtoend_13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,53 @@ jobs:
run: |
git config --global --add url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Check out code
uses: actions/checkout@v4

- name: Check for changes in relevant files
uses: dorny/[email protected]
id: changes
with:
token: ''
filters: |
end_to_end:
- 'go/**/*.go'
- 'go/vt/sidecardb/**/*.sql'
- 'test.go'
- 'Makefile'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'proto/*.proto'
- 'tools/**'
- 'config/**'
- 'bootstrap.sh'
- '.github/workflows/cluster_endtoend_13.yml'
- name: Set up Go
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@v5
with:
go-version: 1.21.7

- name: Set up python
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-python@v5

- name: Tune the OS
if: steps.changes.outputs.end_to_end == 'true'
run: |
sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535"
# Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio
echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
- name: Check out code
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/checkout@v4

- name: Get dependencies
if: steps.changes.outputs.end_to_end == 'true'
env: # Or as an environment variable
AWS_ACCESS_KEY_ID: ${{ secrets.BUILDKITE_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BUILDKITE_S3_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -70,6 +98,7 @@ jobs:
go mod download
- name: Run cluster endtoend test
if: steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 45
run: |
# We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/cluster_endtoend_15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,53 @@ jobs:
run: |
git config --global --add url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Check out code
uses: actions/checkout@v4

- name: Check for changes in relevant files
uses: dorny/[email protected]
id: changes
with:
token: ''
filters: |
end_to_end:
- 'go/**/*.go'
- 'go/vt/sidecardb/**/*.sql'
- 'test.go'
- 'Makefile'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'proto/*.proto'
- 'tools/**'
- 'config/**'
- 'bootstrap.sh'
- '.github/workflows/cluster_endtoend_15.yml'
- name: Set up Go
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@v5
with:
go-version: 1.21.7

- name: Set up python
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-python@v5

- name: Tune the OS
if: steps.changes.outputs.end_to_end == 'true'
run: |
sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535"
# Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio
echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
- name: Check out code
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/checkout@v4

- name: Get dependencies
if: steps.changes.outputs.end_to_end == 'true'
env: # Or as an environment variable
AWS_ACCESS_KEY_ID: ${{ secrets.BUILDKITE_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BUILDKITE_S3_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -70,6 +98,7 @@ jobs:
go mod download
- name: Run cluster endtoend test
if: steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 45
run: |
# We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/cluster_endtoend_18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,53 @@ jobs:
run: |
git config --global --add url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Check out code
uses: actions/checkout@v4

- name: Check for changes in relevant files
uses: dorny/[email protected]
id: changes
with:
token: ''
filters: |
end_to_end:
- 'go/**/*.go'
- 'go/vt/sidecardb/**/*.sql'
- 'test.go'
- 'Makefile'
- 'build.env'
- 'go.sum'
- 'go.mod'
- 'proto/*.proto'
- 'tools/**'
- 'config/**'
- 'bootstrap.sh'
- '.github/workflows/cluster_endtoend_18.yml'
- name: Set up Go
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-go@v5
with:
go-version: 1.21.7

- name: Set up python
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/setup-python@v5

- name: Tune the OS
if: steps.changes.outputs.end_to_end == 'true'
run: |
sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535"
# Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio
echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
- name: Check out code
if: steps.changes.outputs.end_to_end == 'true'
uses: actions/checkout@v4

- name: Get dependencies
if: steps.changes.outputs.end_to_end == 'true'
env: # Or as an environment variable
AWS_ACCESS_KEY_ID: ${{ secrets.BUILDKITE_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BUILDKITE_S3_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -70,6 +98,7 @@ jobs:
go mod download
- name: Run cluster endtoend test
if: steps.changes.outputs.end_to_end == 'true'
timeout-minutes: 45
run: |
# We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file
Expand Down
Loading

0 comments on commit 0201ac7

Please sign in to comment.