Skip to content

Ensuring macOS compatibility without access to a Mac device

Sim edited this page Jul 26, 2023 · 4 revisions

This page is dedicated to ensuring smooth cross-platform code contributions. By using the pull request workflow combined with end-to-end testing, you can be confident that the app works as intended across multiple platforms.

Pull Request Workflow for Cross-Platform Compatibility

With our end-to-end tests covering critical parts of the app on each platform, you don't have to worry if you can't personally test the app on every platform. The pull request workflow alongside automated testing will help ensure compatibility. Here's a step-by-step guide:

  1. Fork the repository: Fork the main repository to create a copy on your GitHub account.
  2. Create a feature branch: On your forked repository, create a new branch for the specific feature or bugfix you are working on.
  3. Make the changes: Implement your changes in the new branch. As long as your changes do not deal with platform-specific functionality, it is unlikely that they will cause compatibility issues.
  4. Commit and push: Commit your changes to the feature branch and push the branch to your forked repository.
  5. Open a pull request: Create a pull request from your feature branch to the main repository's development branch. Once created, the pull request will trigger the end-to-end testing workflow (via GitHub Actions) ensuring that your code is buildable, passes the linter, and functions correctly on every supported platform.
  6. Review the results: Once the testing workflow completes, review the results. If any issues have surfaced, rectify them and push the updates to your pull request.
  7. Wait for a maintainer to merge your changes: If all tests pass and your pull request is approved by a reviewer, the changes can will merged into the main repository's development branch. They will eventually be pushed out to the main branch, generating a new release for end users.

By following this workflow, you can ensure your changes are compatible across all supported platforms, even without direct access to each one.

General Guidelines for Cross-Platform Compatibility

To minimize compatibility issues across different operating systems, consider the following guidelines when making changes:

  • Avoid using platform-specific APIs or libraries, unless absolutely necessary. If you must use them, make sure to provide fallbacks or alternatives for other platforms.
  • Use widely supported Node.js modules and APIs, which are designed to work across platforms.
  • Utilize automated testing: Rely on the pull request workflow and automated end-to-end testing to confirm compatibility on all platforms.
  • Follow established best practices and conventions in your code, as these often help ensure cross-platform compatibility.

By following these guidelines and using the pull request workflow, you can be confident that the app will run smoothly across all platforms.