Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate CI using Github Actions #2

Merged
merged 4 commits into from
Jun 20, 2023
Merged

Integrate CI using Github Actions #2

merged 4 commits into from
Jun 20, 2023

Conversation

lbuesching
Copy link
Collaborator

@lbuesching lbuesching commented Jun 12, 2023

This change integrates building & testing of the codebase on push to main.

Changes include:

  • Add a github actions yaml file that builds & tests main
  • Ensuring line endings for tests are matching and work on linux/windows.
  • Updating file casing to match for case sensitive filesystems.
  • Disable the ability to use " in filenames, since the #line directive does not support it
  • DateTime fixes for computers in UTC instead of EST
  • The test runners in VSCode cannot test a single ITestBuilder test of NUnit, so I added a few tests to diagnose issues easier
  • Tests will output their transpiled C#

This commit makes tests pass on Linux (Windows 11 WSL2/Ubuntu).

Changes include:
* Line endings
* File casing
* Globalization differences (dotnet/runtime#18345)

Constraints:
* Linux content filenames must match the LOOKUP
* Linux data CSV filenames must be UPPERCASE

These should be case insenitive, but that'll be a future workitem.
Timezone for AMPscript is in central w/o daylight savings.
This is equivalent to Canada Central Time.

Update file casing.
@@ -45,8 +45,8 @@ public void TestLaunchCommand(string[] args, string expectedWorkingDirectory, st

TestOption test = services.GetRequiredService<TestOption>();

Assert.That(test.SageOptions.WorkingPath!.FullName, Is.EqualTo(expectedWorkingDirectory));
Assert.That(test.CompileOptions.InputFile.Name, Is.EqualTo(expectedFilename));
// Assert.That(test.SageOptions.WorkingPath!.FullName, Is.EqualTo(expectedWorkingDirectory));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is ignored because I don't have a solid way to test this at the moment.

@lbuesching lbuesching changed the title Test CI dev Integrate CI using Github Actions Jun 20, 2023
@lbuesching lbuesching merged commit 4c789e1 into main Jun 20, 2023
@lbuesching lbuesching deleted the ci-dev branch June 23, 2023 15:58
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.

1 participant