Skip to content

Commit

Permalink
Merge pull request #508 from nils-a/feature/GH-506
Browse files Browse the repository at this point in the history
(#506) run verifier only when explicitly requested
  • Loading branch information
nils-a authored Dec 20, 2024
2 parents 52da30f + 409f7f3 commit f138f75
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"extends": [
"github>cake-contrib/renovate-presets:cake-recipe",
"github>cake-contrib/renovate-presets:github-actions" ],
"packageRules": []
"packageRules": [],
"milestone": 13
}
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-2022, ubuntu-22.04, macos-13 ]

Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Verify

on:
workflow_run:
workflows: ["Build"]
branches: ["develop"]
types:
- completed

jobs:
verify:
runs-on: windows-2022
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Checkout the requested branch
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4

- name: Fetch all tags and branches
run: git fetch --prune --unshallow

# Setup Java 11 environment which is needed to build
- name: Setup Java
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: 'zulu'
java-version: '17'

# Setup dotnet 6 (and 2.1 for Wyam, 3.1 for gitReleaseManager, 5.0 for gitVersion)
- name: Setup dotnet
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
with:
dotnet-version: |
2.1.x
3.1.x
5.0.x
6.0.x
# Cache Cake tools
- name: Cache Tools
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}

- name: See the available space
run: |
echo "tmp points to ${{ runner.temp }}"
Get-Volume
- name: Build project
uses: cake-build/cake-action@1223b6fa067ad192159f43b50cd4f953679b0934 # v2.0.0
with:
script-path: recipe.cake
target: Run-Plugin-Verifier
cake-version: tool-manifest
arguments: |
enable-verifier: true
4 changes: 3 additions & 1 deletion recipe.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#load nuget:?package=Cake.IntelliJ.Recipe&version=0.3.0

var verify = Argument("enable-verifier", false);

Environment.SetVariableNames(
githubTokenVariable: "GITHUB_PAT"
);
Expand All @@ -14,7 +16,7 @@ IntelliJBuildParameters.SetParameters(
marketplaceId: "15729-cake-rider",
webLinkRoot: "", // do *not* create a virtual directory for wyam docs. This setting will break gh-pages. (But work for preview)
wyamConfigurationFile: MakeAbsolute((FilePath)"docs/wyam.config"),
shouldRunPluginVerifier: !IsRunningOnLinux(),
shouldRunPluginVerifier: verify,
intelliJAnalyzerTasks: new[]{ "detekt", "verifyPlugin" }, // skip ktlintCheck for now
preferredBuildProviderType: BuildProviderType.GitHubActions,
preferredBuildAgentOperatingSystem: PlatformFamily.Windows
Expand Down

0 comments on commit f138f75

Please sign in to comment.