Skip to content

CI/CD test and publish to NuGet#282

Open
ashtonmeuser wants to merge 6 commits intonuskey8:mainfrom
ashtonmeuser:cicd
Open

CI/CD test and publish to NuGet#282
ashtonmeuser wants to merge 6 commits intonuskey8:mainfrom
ashtonmeuser:cicd

Conversation

@ashtonmeuser
Copy link
Copy Markdown
Contributor

@ashtonmeuser ashtonmeuser commented Mar 25, 2026

Simple GitHub Action workflow to run tests and publish to NuGet. @nuskey8 This will require an API key stored as a secret. Runs on pushing a semver tag e.g. v0.5.4 or via explicit workflow dispatch.

This PR also throws the ExpectedFailure onto several of the test files inherited from Lua proper so we can skip them during CI. Note that additional test cases would require ExpectedFailure unless #279 is merged.

@ashtonmeuser
Copy link
Copy Markdown
Contributor Author

ashtonmeuser commented Mar 25, 2026

This still requires updating Directory.Build.props with the correct version number. A nice-to-have improvement may be validating this version against the pushed tag.

Edit: I actually found that the versions had diverged already. See Directory.Build.props (0.5.3) and src/Lua.Unity/Assets/package.json (0.5.1). Added the version check.

@ashtonmeuser
Copy link
Copy Markdown
Contributor Author

Any thoughts or concerns about this, @nuskey8 @akeit0?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions workflow to run the test suite and (on semver tag pushes) publish the NuGet package, while marking a couple of inherited Lua test files as expected failures so CI can skip them.

Changes:

  • Introduces .github/workflows/nuget.yml to restore, test (excluding ExpectedFailure), pack, and publish on v*.*.* tags (or manual dispatch).
  • Marks tests-lua/files.lua and tests-lua/errors.lua test cases as ExpectedFailure so they can be filtered out in CI.
  • Ignores build output under artifacts/ in .gitignore.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/Lua.Tests/LuaTests.cs Categorizes two Lua test cases as ExpectedFailure for CI filtering.
.gitignore Adds artifacts/ to ignored paths.
.github/workflows/nuget.yml New workflow for version validation, tests, packing, artifact upload, and NuGet publish.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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