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

Create GitHub actions workflow to run tests #41

Merged
merged 10 commits into from
May 3, 2024

Conversation

mattwr18
Copy link
Collaborator

@mattwr18 mattwr18 commented Apr 30, 2024

What changed in this PR and why

  • GitHub actions workflow added for Ruby 2.7 and 3.0
  • Travis removed - along with comments that reference it.
  • Codecov and codeclimate-test-reporter as codecov is not free, is not setup currently, and prevents CI from passing.
  • Simplecov has not been removed, but it now generate an HTML view of test coverage, not sure if that is useful, or if it could also be removed.
  • Tests failed because of the case_transform gem's reliance on activesupport 7.1 and the error:
undefined method `deprecator' for ActiveSupport:Module (NoMethodError)

The gem was removed as it was only used in two files and transforms the case in a way that we can do without an extra gem.

  • activesupport gem was added because we use methods that we were inheriting from case_transform dependency on activesupport, ie .blank?
  • Update the shared_values to not rely on .env variables for credentials, but set up test values (test should pass without production credentials set in .env)
  • Update factories after changes to the Threema class three years ago that were not reflected in the test setup
  • Manually updated the fingerprint of the threema api, which must be done in the test env to keep the optional static certificate pinning feature.

- Flaky since they rely on the sha256 fingerprint, which changes over
  time
it is required to run commands such as `.blank?`. Previously it was
being installed upstream in the deprecated case_transform gem
- tests still failing locally...
codecov is no longer configured, is not free, and is currently blocking
running tests in CI
@mattwr18 mattwr18 changed the title Create GitHub actions to run tests Create GitHub actions workflow to run tests May 3, 2024
Copy link
Collaborator

@roschaefer roschaefer left a comment

Choose a reason for hiding this comment

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

flawless

Yes, perfect! 💪 I'll merge.


spec.files = Dir['{lib}/**/*']
spec.require_paths = ['lib']

spec.add_runtime_dependency 'case_transform'
spec.add_runtime_dependency 'activesupport', '~> 7.0.8'
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be nice to only import active support's string inflections. But I'm not aware how this is possible in Ruby land.

# this is needed due to internet access restrictions
# in the (travis) CI environment
# skipped in CI because this test requires actual
# private key, identity, etc set in .env variables
Copy link
Collaborator

Choose a reason for hiding this comment

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

And that's the only spec that fails on my machine locally. 👍

@roschaefer roschaefer merged commit 537dd1d into master May 3, 2024
2 checks passed
@roschaefer roschaefer deleted the setup_github_actions-for-test-runs branch May 3, 2024 16: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.

2 participants