Skip to content

Add GitHub Actions workflow for automated testing #2

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 15, 2025

This PR adds a GitHub Actions workflow to automatically run tests on push and pull requests, addressing the need for continuous integration.

Changes Made

  • Created .github/workflows/test.yml with a comprehensive CI workflow
  • Configured testing across Ruby versions 3.0, 3.1, 3.2, and 3.3
  • Used modern GitHub Actions best practices:
    • actions/checkout@v4 for code checkout
    • ruby/setup-ruby@v1 for Ruby environment setup
    • Automatic dependency caching with bundler-cache: true
    • Runs tests using bundle exec rake test

Workflow Features

The workflow triggers on:

  • Push to main or master branches
  • Pull requests targeting main or master branches

The test matrix ensures compatibility across multiple Ruby versions, providing confidence that the gem works correctly in different environments.

Testing

  • ✅ YAML syntax validated locally
  • ✅ Workflow configuration follows GitHub Actions best practices
  • ✅ Uses the existing test infrastructure (rake test with minitest)
  • ✅ Leverages existing dependency management (Bundler with Gemfile)

This workflow can be extended in the future to include appraisal testing for different ActiveSupport versions if needed.

This pull request was created as a result of the following prompt from Copilot chat.

Add a GitHub action to run the tests.

The action should:

  • checkout the code
  • setup ruby
  • install dependencies
  • run tests

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI assigned Copilot and sshaw Jul 15, 2025
@Copilot Copilot AI changed the title [WIP] CI: Add GitHub Action to run tests Add GitHub Actions workflow for automated testing Jul 15, 2025
@Copilot Copilot AI requested a review from sshaw July 15, 2025 21:17
Copilot finished work on behalf of sshaw July 15, 2025 21:17
@sshaw sshaw marked this pull request as ready for review July 15, 2025 21:23
@sshaw
Copy link
Owner

sshaw commented Jul 16, 2025

@copilot we need to update Rake, it's causing tests to fail. We can just remove the version restriction here: https://github.com/sshaw/class2/blob/copilot%2Ffix-b6485cde-19d9-4943-beed-ef9a57ede3c8/class2.gemspec#L24

Copy link
Contributor Author

Copilot AI commented Jul 16, 2025

@copilot we need to update Rake, it's causing tests to fail. We can just remove the version restriction here: https://github.com/sshaw/class2/blob/copilot%2Ffix-b6485cde-19d9-4943-beed-ef9a57ede3c8/cl...

I've removed the Rake version restriction from line 24 of the gemspec. The change allows the gem to work with modern Rake versions instead of being locked to ~> 10.0. This should fix the test failures in the GitHub Actions workflow. (ed17a73)

Copilot finished work on behalf of sshaw July 16, 2025 00:43
@sshaw sshaw force-pushed the copilot/fix-b6485cde-19d9-4943-beed-ef9a57ede3c8 branch from ed17a73 to e81e123 Compare July 16, 2025 01:47
@sshaw sshaw force-pushed the copilot/fix-b6485cde-19d9-4943-beed-ef9a57ede3c8 branch from e81e123 to 0fa39e4 Compare July 16, 2025 01:50
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