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

feat(devcontainers): add the ability to use GitHub Codespaces and VS Code remote containers #727

Closed
wants to merge 1 commit into from
Closed

Conversation

andrewbrey
Copy link

Description

For Hacktoberfest, I have been adding GitHub Codespaces / VS Code Dev Containers configuration for OSS projects to make it easier for contributors to the project to get up and running with the correct developer setup. Including the appropriate configuration for a project allows contributors to work entirely within a web browser via GH Codespaces, or inside of fully, and correctly configured containers on their own computer with VS Code Remote Containers (both of these use the same configuration, as GH Codespaces leverages the Remote Containers features under the hood).

For the bruno project, this configuration includes the following:

  • Preinstalled Node LTS
  • Preinstalled ESLint, Tailwind CSS, and Prettier extensions
  • Preinstalled playwright dependencies
  • Automation of the npm install when the devcontainer is first created
  • Automation of the initial (required) builds of the docs and query projects

Basically everything needed for a contributor to open the project after a fresh clone and be immediately productive, either locally with VS Code or remotely with GitHub Codespaces!

Note

The version of playwright in use in the repository is pretty out of date (^1.27.1, released over a year ago, is in the package.json but 1.39.0 is the latest version).

Due to the workspace dependency being out of date, when the devcontainer automation to install the playwright browsers runs it installs older versions of the browsers (playwright attempts to always install browsers compatible with the playwright version) and these older browsers rely on outdated system dependencies which aren't present in this container.

The end result of this is that some playwright tests are currently failing when run inside of the devcontainer, and the fix is very simple - just update the installed playwright dependency to the latest version (1.39.0) so that it can use newer browser builds.

I did not make that change in this PR as it felt out of scope to update an application dependency while adding the devcontainer configuration.

For reference, here are some other repositories for whom I've opened PRs to do the same:

Contribution Checklist:

  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Closes #722
Supersedes #723 (closed and re-opened with a new branch name to match requested format)

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.

Support GitHub Codespaces and VS Code Dev Containers
1 participant