Skip to content

Commit b7e6c59

Browse files
author
David Cavazos
committed
remove everything related to run-all
1 parent 22f4361 commit b7e6c59

File tree

3 files changed

+2
-124
lines changed

3 files changed

+2
-124
lines changed

.github/cloud-samples-tools/cmd/main.go

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ commands:
3333
run-all path/to/config.jsonc path/to/script.sh
3434
`
3535

36+
// Entry point to validate command line arguments.
3637
func main() {
3738
flag.Parse()
3839

@@ -55,24 +56,12 @@ func main() {
5556

5657
affectedCmd(configFile, diffsFile)
5758

58-
case "run-all":
59-
configFile := flag.Arg(1)
60-
if configFile == "" {
61-
log.Fatalln("❌ no config file specified\n", usage)
62-
}
63-
64-
script := flag.Arg(2)
65-
if script == "" {
66-
log.Fatalln("❌ no script file specified\n", usage)
67-
}
68-
69-
runAllCmd(configFile, script)
70-
7159
default:
7260
log.Fatalln("❌ unknown command: ", command, "\n", usage)
7361
}
7462
}
7563

64+
// affected command entry point to validate inputs.
7665
func affectedCmd(configFile string, diffsFile string) {
7766
config, err := utils.LoadConfig(configFile)
7867
if err != nil {
@@ -105,26 +94,3 @@ func affectedCmd(configFile string, diffsFile string) {
10594

10695
fmt.Println(string(packagesJson))
10796
}
108-
109-
func runAllCmd(configFile string, script string) {
110-
config, err := utils.LoadConfig(configFile)
111-
if err != nil {
112-
log.Fatalln("❌ error loading the config file: ", configFile, "\n", err)
113-
}
114-
115-
packages, err := utils.FindAllPackages(".", config)
116-
if err != nil {
117-
log.Fatalln("❌ error finding packages.\n", err)
118-
}
119-
120-
maxGoroutines := 16
121-
failed := utils.RunAll(packages, script, maxGoroutines)
122-
123-
fmt.Printf(strings.Repeat("-", 80) + "\n")
124-
fmt.Printf("Total tests: %v\n", len(packages))
125-
fmt.Printf("Failed tests: %v\n", failed)
126-
127-
if failed > 0 {
128-
log.Fatalln("❌ some tests failed, exit with code 1.")
129-
}
130-
}

.github/cloud-samples-tools/pkg/utils/runAll.go

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/experimental.yaml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -88,36 +88,3 @@ jobs:
8888
bash .github/scripts/nodejs-test.sh ${{ matrix.package }}
8989
env:
9090
GOOGLE_SAMPLES_PROJECT: long-door-651
91-
92-
# nodejs-nightly:
93-
# name: Node.js 20
94-
# runs-on: ubuntu-latest
95-
# permissions:
96-
# id-token: write # needed for google-github-actions/auth
97-
# strategy:
98-
# fail-fast: false
99-
# matrix:
100-
# # run: ${{ fromJson(github.event_name == 'schedule' && '["nightly tests"]' || '[]') }}
101-
# run: ${{ fromJson('["nightly tests"]') }}
102-
# steps:
103-
# - uses: actions/checkout@v4
104-
# with:
105-
# ref: ${{ github.event.pull_request.head.sha }}
106-
# - uses: actions/setup-node@v4
107-
# with:
108-
# node-version: 20
109-
# - uses: google-github-actions/auth@v2
110-
# with:
111-
# project_id: long-door-651
112-
# workload_identity_provider: projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider
113-
# service_account: [email protected]
114-
# access_token_lifetime: 600s # 10 minutes
115-
# - uses: actions/setup-go@v5
116-
# with:
117-
# go-version: ${{ env.GO_VERSION }}
118-
# - run: go build -o ${{ github.workspace }}/tools ./cmd/...
119-
# working-directory: .github/cloud-samples-tools
120-
# - name: Run all tests
121-
# run: ./tools run-all .github/config/nodejs.jsonc .github/scripts/nodejs-test.sh
122-
# env:
123-
# GOOGLE_SAMPLES_PROJECT: long-door-651

0 commit comments

Comments
 (0)