forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip CI workflows based on the list of modified files (vitessio#10031)
* Try paths-filter Signed-off-by: Sara Bee <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> * forgot 'uses' Signed-off-by: Sara Bee <[email protected]> * Regenerate workflows Signed-off-by: Sara Bee <[email protected]> * feat: addition of skip paths in every workflow templates Signed-off-by: Florent Poinsard <[email protected]> * feat: re generated CI files Signed-off-by: Florent Poinsard <[email protected]> * feat: filter end-to-end tests per **/endtoend/**.go Signed-off-by: Florent Poinsard <[email protected]> * feat: fix end-to-end filter and addition of filter for go_files Signed-off-by: Florent Poinsard <[email protected]> * feat: comprehensive filtering for end-to-end tests Signed-off-by: Florent Poinsard <[email protected]> * feat: filter go files for golint, gofmt, and goimports Signed-off-by: Florent Poinsard <[email protected]> * feat: addition of path filtering for unit test workflows Signed-off-by: Florent Poinsard <[email protected]> * feat: addition of path filtering for check make parser Signed-off-by: Florent Poinsard <[email protected]> * feat: addition of bootstrap.sh to the path filtering and new filter for make proto Signed-off-by: Florent Poinsard <[email protected]> * feat: path filtering for make sizegen Signed-off-by: Florent Poinsard <[email protected]> * feat: path filtering for make visitor Signed-off-by: Florent Poinsard <[email protected]> * feat: path filtering for unit_race Signed-off-by: Florent Poinsard <[email protected]> * feat: fix condition for check make proto Signed-off-by: Florent Poinsard <[email protected]> * feat: addition of bootstrap to the unit_test workflows Signed-off-by: Florent Poinsard <[email protected]> * feat: addition of path filtering for end-to-end, examples workflows, ugprade downgrade workflows Signed-off-by: Florent Poinsard <[email protected]> * feat: addition of path filtering for docker and initial sharding multi workflows Signed-off-by: Florent Poinsard <[email protected]> * feat: revert test change in misc_test.go Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Sara Bee <[email protected]>
- Loading branch information
Showing
96 changed files
with
2,439 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,43 @@ | ||
name: check_formatting | ||
on: [pull_request,push] | ||
jobs: | ||
|
||
build: | ||
name: Check Formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
if: needs.check_relevant_files.outputs.go_files == 'true' | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check for changes in Go files | ||
uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
go_files: | ||
- '**/*.go' | ||
- '*.go' | ||
- 'go.[sumod]' | ||
- name: Set up Go | ||
if: steps.changes.outputs.go_files == 'true' | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Tune the OS | ||
if: steps.changes.outputs.go_files == 'true' | ||
run: | | ||
echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range | ||
# TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 | ||
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file | ||
if: steps.changes.outputs.go_files == 'true' | ||
run: | | ||
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts | ||
# DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run go fmt | ||
if: steps.changes.outputs.go_files == 'true' | ||
run: | | ||
gofmt -l . | grep -vF vendor/ && exit 1 || echo "All files formatted correctly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,36 @@ | ||
name: check_imports | ||
on: [pull_request,push] | ||
jobs: | ||
|
||
build: | ||
name: Check Imports | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check for changes in Go files | ||
uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
go_files: | ||
- '**/*.go' | ||
- '*.go' | ||
- 'go.[sumod]' | ||
- name: Set up Go | ||
if: steps.changes.outputs.go_files == 'true' | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install goimports | ||
if: steps.changes.outputs.go_files == 'true' | ||
run: | | ||
go install golang.org/x/tools/cmd/goimports@latest | ||
- name: Run goimports | ||
if: steps.changes.outputs.go_files == 'true' | ||
run: | | ||
out=$(goimports -local vitess.io/vitess -l -w $(find . -name "*.go" | grep -v ".pb.go")) | ||
echo $out | grep go > /dev/null && echo -e "The following files are malformatted:\n$out" && exit 1 || echo "All the files are formatted correctly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.