-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lint upstream as a normal unit test (#4918)
This removes the last job in `extraTests` by making it a standard unit test. Currently the job runs without caching and takes upwards of 30-40 minutes because it re-compiles everything from scratch. This makes it the long poll when sharding is [turned on](https://github.com/pulumi/pulumi-aws/actions/runs/12321334449). By running with the rest of our tests it can benefit from caching. Locally the test takes only ~20s. This is run during unit tests, which still take about ~5 minutes before and after this change. They're actually slightly faster because I parallelized some of them while I was in here.
- Loading branch information
Showing
16 changed files
with
110 additions
and
58 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
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
24 changes: 24 additions & 0 deletions
24
patches/0079-Speed-up-providerlint-by-re-using-build-cache-and-ig.patch
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Bryce Lampe <[email protected]> | ||
Date: Fri, 13 Dec 2024 13:44:02 -0800 | ||
Subject: [PATCH] Speed up providerlint by re-using build cache and ignoring | ||
tests | ||
|
||
|
||
diff --git a/GNUmakefile b/GNUmakefile | ||
index 9b4adecff8..32137c8919 100644 | ||
--- a/GNUmakefile | ||
+++ b/GNUmakefile | ||
@@ -326,9 +326,10 @@ prereq-go: ## If $(GO_VER) is not installed, install it | ||
|
||
provider-lint: ## [CI] ProviderLint Checks / providerlint | ||
@echo "make: ProviderLint Checks / providerlint..." | ||
- @cd .ci/providerlint && go install -buildvcs=false . | ||
- @providerlint \ | ||
+ @cd .ci/providerlint && go build -buildvcs=false . | ||
+ @.ci/providerlint/providerlint \ | ||
-c 1 \ | ||
+ -test=false \ | ||
-AT001.ignored-filename-suffixes=_data_source_test.go \ | ||
-AWSAT006=false \ | ||
-AWSR002=false \ |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2024, Pulumi Corporation. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
package provider | ||
|
||
import ( | ||
"os" | ||
"os/exec" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestUpstreamLint(t *testing.T) { | ||
t.Parallel() | ||
|
||
cmd := exec.Command("make", "provider-lint") | ||
cmd.Dir = "../upstream" | ||
|
||
cmd.Stdout = os.Stdout | ||
cmd.Stderr = os.Stderr | ||
|
||
err := cmd.Start() | ||
require.NoError(t, err) | ||
|
||
err = cmd.Wait() | ||
assert.NoError(t, err) | ||
} |