-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR #86 from realmarv/ymlSameVersions-squashed
Detect inconsistent (e.g. pulumi) versions in GitHubCI and (e.g. nuget pkgs versions) in fsx scripts.
- Loading branch information
Showing
22 changed files
with
581 additions
and
6 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 |
---|---|---|
|
@@ -182,6 +182,10 @@ jobs: | |
- name: Check if gitPush1by1 was used | ||
if: github.event_name == 'pull_request' | ||
run: dotnet fsi scripts/detectNotUsingGitPush1by1.fsx | ||
- name: Check there are no inconsistent versions GitHubCI files | ||
run: dotnet fsi scripts/inconsistentVersionsInGitHubCI.fsx | ||
- name: Check there are no inconsistent versions in nuget package references of F# scripts | ||
run: dotnet fsi scripts/inconsistentVersionsInFSharpScripts.fsx | ||
- name: Install prettier | ||
run: npm install [email protected] | ||
- name: Change file permissions | ||
|
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,16 @@ | ||
#!/usr/bin/env -S dotnet fsi | ||
|
||
open System.IO | ||
|
||
#load "../src/FileConventions/Library.fs" | ||
#load "../src/FileConventions/Helpers.fs" | ||
|
||
let rootDir = Path.Combine(__SOURCE_DIRECTORY__, "..") |> DirectoryInfo | ||
|
||
let inconsistentVersionsInFsharpScripts = | ||
Helpers.GetFiles rootDir "*.fsx" | ||
|> FileConventions.DetectInconsistentVersionsInNugetRefsInFSharpScripts | ||
|
||
if inconsistentVersionsInFsharpScripts then | ||
failwith | ||
"You shouldn't use inconsistent versions in nuget package references of F# scripts." |
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,15 @@ | ||
#!/usr/bin/env -S dotnet fsi | ||
|
||
open System.IO | ||
|
||
#load "../src/FileConventions/Library.fs" | ||
|
||
let githubWorkflowsDir = | ||
Path.Combine(__SOURCE_DIRECTORY__, "../.github/workflows") |> DirectoryInfo | ||
|
||
let inconsistentVersionsInGitHubCI = | ||
FileConventions.DetectInconsistentVersionsInGitHubCI githubWorkflowsDir | ||
|
||
if inconsistentVersionsInGitHubCI then | ||
failwith | ||
"You shouldn't use inconsistent versions in `uses: foo@bar` or `with: foo-version: bar` statements in GitHubCI files." |
25 changes: 25 additions & 0 deletions
25
src/FileConventions.Test/DummyFiles/DummyCIWithSamePulumiVersion.yml
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,25 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" | ||
jobB: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
25 changes: 25 additions & 0 deletions
25
src/FileConventions.Test/DummyFiles/DummyCIWithSameSetupPulumiVersion.yml
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,25 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" | ||
jobB: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
15 changes: 15 additions & 0 deletions
15
src/FileConventions.Test/DummyFiles/DummyCIWithSetupPulumiVersionV2.0.0.yml
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,15 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
15 changes: 15 additions & 0 deletions
15
src/FileConventions.Test/DummyFiles/DummyCIWithSetupPulumiVersionV2.0.1.yml
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,15 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
17 changes: 17 additions & 0 deletions
17
src/FileConventions.Test/DummyFiles/DummyCIWithoutSameCheckoutVersion.yml
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,17 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" | ||
jobB: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
23 changes: 23 additions & 0 deletions
23
src/FileConventions.Test/DummyFiles/DummyCIWithoutSameNodeVersion.yml
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,23 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "14" | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" | ||
jobB: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
25 changes: 25 additions & 0 deletions
25
src/FileConventions.Test/DummyFiles/DummyCIWithoutSamePulumiVersion.yml
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,25 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" | ||
jobB: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.41.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
25 changes: 25 additions & 0 deletions
25
src/FileConventions.Test/DummyFiles/DummyCIWithoutSameSetupPulumiVersion.yml
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,25 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" | ||
jobB: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
8 changes: 8 additions & 0 deletions
8
src/FileConventions.Test/DummyFiles/DummyFsharpScriptWithFsdkVersion0.6.0.fsx
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,8 @@ | ||
#!/usr/bin/env -S dotnet fsi | ||
|
||
open System | ||
open System.IO | ||
|
||
#r "nuget: Fsdk, Version=0.6.0" | ||
|
||
printfn "Hello World!" |
8 changes: 8 additions & 0 deletions
8
src/FileConventions.Test/DummyFiles/DummyFsharpScriptWithFsdkVersion0.6.1.fsx
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,8 @@ | ||
#!/usr/bin/env -S dotnet fsi | ||
|
||
open System | ||
open System.IO | ||
|
||
#r "nuget: Fsdk, Version=0.6.1" | ||
|
||
printfn "Hello World!" |
8 changes: 8 additions & 0 deletions
8
src/FileConventions.Test/DummyFiles/DummyScripts/DummyFsharpScriptWithFsdkVersion0.6.0.fsx
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,8 @@ | ||
#!/usr/bin/env -S dotnet fsi | ||
|
||
open System | ||
open System.IO | ||
|
||
#r "nuget: Fsdk, Version=0.6.0" | ||
|
||
printfn "Hello World!" |
8 changes: 8 additions & 0 deletions
8
src/FileConventions.Test/DummyFiles/DummyScripts/DummyFsharpScriptWithFsdkVersion0.6.1.fsx
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,8 @@ | ||
#!/usr/bin/env -S dotnet fsi | ||
|
||
open System | ||
open System.IO | ||
|
||
#r "nuget: Fsdk, Version=0.6.1" | ||
|
||
printfn "Hello World!" |
15 changes: 15 additions & 0 deletions
15
src/FileConventions.Test/DummyFiles/DummyWorkflows/DummyCIWithSetupPulumiVersionV2.0.0.yml
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,15 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
15 changes: 15 additions & 0 deletions
15
src/FileConventions.Test/DummyFiles/DummyWorkflows/DummyCIWithSetupPulumiVersionV2.0.1.yml
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,15 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
jobA: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Pulumi CLI | ||
uses: pulumi/[email protected] | ||
with: | ||
pulumi-version: 3.40.0 | ||
- name: Print "Hello World!" | ||
run: echo "Hello World!" |
Oops, something went wrong.