Skip to content

Conversation

@webwarrior-ws
Copy link
Contributor

In inconsistentVersionsInGitHubCI.fsx script when searching for vars referenced in Github workflow files, when .env file is present in the repository root. This is needed because workflows in pulumi-deploy now load vars from .env file.

@webwarrior-ws webwarrior-ws force-pushed the github-versions-env branch 2 times, most recently from dd5cb66 to b713a0b Compare November 3, 2025 08:51
@knocte
Copy link
Member

knocte commented Nov 3, 2025

Let's:

  • Rebase this PR.
  • After rebased, add a unit test in a new commit.
  • After added the unit test, move the unit test commit to be the first of the PR (to see the red CI on it).

@knocte
Copy link
Member

knocte commented Nov 3, 2025

BTW, typo: Comventions.

@webwarrior-ws webwarrior-ws changed the title FileComventions(Test),scripts: take .env file into account FileConventions(Test),scripts: take .env file into account Nov 4, 2025
@webwarrior-ws
Copy link
Contributor Author

BTW, typo: Comventions.

Fixed typo

@webwarrior-ws
Copy link
Contributor Author

Let's:

  • Rebase this PR.
  • After rebased, add a unit test in a new commit.
  • After added the unit test, move the unit test commit to be the first of the PR (to see the red CI on it).

I can't really add a test before the changes because the signature of the tested function (DetectInconsistentVersionsInGitHubCIWorkflow) is changed.

@knocte
Copy link
Member

knocte commented Nov 4, 2025

I can't really add a test before the changes because the signature of the tested function
(DetectInconsistentVersionsInGitHubCIWorkflow) is changed.

That's a poor excuse, changing the signature is ok, but only that change in the non-unittest assembly is allowed.

@webwarrior-ws webwarrior-ws force-pushed the github-versions-env branch 2 times, most recently from 6a3fa8e to f815f61 Compare November 4, 2025 10:23
To functions used to detect inconsistent versions in GithubCI.
This change is needed to be able to take .env file into account
when searching for vars referenced in Github workflow files.
Added test for detecting inconsistent versions in Github
workflow files with values in global environment dictionary.

Contains failing test.
Take .env file into account in
inconsistentVersionsInGitHubCI.fsx script when searching for
vars referenced in Github workflow files, when .env file is
present in the repository root. This is needed because
workflows in pulumi-deploy now load vars from .env file.
@webwarrior-ws
Copy link
Contributor Author

Added commit that only changes the function's signature, then commit that adds test. And the last one with implementation.

@@ -0,0 +1,25 @@
name: CI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@webwarrior-ws given that the tests themselves depend on files present inside this DummyFiles/ folder, then I'd prefer to include the env vars in an .env file inside this same folder. Also, let's rename this file to include "DotEnv" in the name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality of parsing .env file is only in the .fsx script, not in Library.fs. Also that file is expected to be ../../ relative to target dir (.github/workflows).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants