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

Devcontainer #91

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "vscode-phpunit",
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm",
"features": {
"ghcr.io/devcontainers/features/php": {
"version": "latest",
"installComposer": true
}
}
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[![Latest Release](https://vsmarketplacebadges.dev/version/emallin.phpunit.svg)](https://marketplace.visualstudio.com/items?itemName=emallin.phpunit) [![Installs](https://vsmarketplacebadges.dev/installs-short/emallin.phpunit.svg)](https://marketplace.visualstudio.com/items?itemName=emallin.phpunit) [![Rating](https://vsmarketplacebadges.dev/rating-short/emallin.phpunit.svg)](https://marketplace.visualstudio.com/items?itemName=emallin.phpunit)
[![Latest Release](https://vsmarketplacebadges.dev/version-short/emallin.phpunit.svg)](https://marketplace.visualstudio.com/items?itemName=emallin.phpunit)
[![Installs](https://vsmarketplacebadges.dev/installs-short/emallin.phpunit.svg)](https://marketplace.visualstudio.com/items?itemName=emallin.phpunit)
[![Rating](https://vsmarketplacebadges.dev/rating-short/emallin.phpunit.svg)](https://marketplace.visualstudio.com/items?itemName=emallin.phpunit)

[![test workflow](https://github.com/elonmallin/vscode-phpunit/actions/workflows/test.yml/badge.svg)](https://github.com/elonmallin/vscode-phpunit/actions/workflows/test.yml)
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/elonmallin/vscode-phpunit)

# PHPUnit for VSCode
This extension aims to need zero config and to be highly configurable. If you have `php` in environment path and `phpunit` installed with `composer` or anywhere in your workspace as `phpunit*.phar`, zero config is needed. It will even fallback to spinning up a self-removing `docker` container to try and run your tests if it can't find `php` on your machine.

Expand Down Expand Up @@ -111,6 +117,25 @@ Run with (`Cmd+Shift+P` on OSX or `Ctrl+Shift+P` on Windows and Linux) and execu
* **Rerun last Test**: Run the `PHPUnit Rerun Last Test` command.

## Keybinding example:

```json5
{ "key": "cmd+shift+t", "command": "phpunit.Test", "when": "editorFocus" }
```
```

# Contribute

Create a PR linking an issue and add [tests](src/test/suite/extension.test.ts) to make the merging go smoother.

## Development

[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/elonmallin/vscode-phpunit)

If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/vscode-remote-try-java) to get started. Clicking these links will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.

### Development dependencies

If you prefer to work locally, install this on your machine:

- Node
- PHP
- Composer
Loading