generated from ddev/ddev-memcached
-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* [What is ddev-addon-template?](#what-is-ddev-addon-template) | ||
* [Components of the repository](#components-of-the-repository) | ||
* [Getting started](#getting-started) | ||
* [How to debug in Github Actions](#how-to-debug-tests-github-actions) | ||
* [How to debug in Github Actions](./README_DEBUG.md) | ||
|
||
## What is ddev-addon-template? | ||
|
||
|
@@ -50,44 +50,4 @@ Add-ons were covered in [DDEV Add-ons: Creating, maintaining, testing](https://w | |
|
||
Note that more advanced techniques are discussed in [Advanced Add-On Techniques](https://ddev.com/blog/advanced-add-on-contributor-training/) and [DDEV docs](https://ddev.readthedocs.io/en/stable/users/extend/additional-services/). | ||
|
||
## How to debug tests (Github Actions) | ||
|
||
1. You need an SSH-key registered with GitHub. You either pick the key you have already used with `github.com` or you create a dedicated new one with `ssh-keygen -t ed25519 -a 64 -f tmate_ed25519 -C "$(date +'%d-%m-%Y')"` and add it at `https://github.com/settings/keys`. | ||
|
||
2. Add the following snippet to `~/.ssh/config`: | ||
|
||
``` | ||
Host *.tmate.io | ||
User git | ||
AddKeysToAgent yes | ||
UseKeychain yes | ||
PreferredAuthentications publickey | ||
IdentitiesOnly yes | ||
IdentityFile ~/.ssh/tmate_ed25519 | ||
``` | ||
3. Go to `https://github.com/<user>/<repo>/actions/workflows/tests.yml`. | ||
|
||
4. Click the `Run workflow` button and you will have the option to select the branch to run the workflow from and activate `tmate` by checking the `Debug with tmate` checkbox for this run. | ||
|
||
![tmate](images/gh-tmate.jpg) | ||
|
||
5. After the `workflow_dispatch` event was triggered, click the `All workflows` link in the sidebar and then click the `tests` action in progress workflow. | ||
|
||
7. Pick one of the jobs in progress in the sidebar. | ||
|
||
8. Wait until the current task list reaches the `tmate debugging session` section and the output shows something like: | ||
|
||
``` | ||
106 SSH: ssh [email protected] | ||
107 or: ssh -i <path-to-private-SSH-key> [email protected] | ||
108 SSH: ssh [email protected] | ||
109 or: ssh -i <path-to-private-SSH-key> [email protected] | ||
``` | ||
|
||
9. Copy and execute the first option `ssh [email protected]` in the terminal and continue by pressing either <kbd>q</kbd> or <kbd>Ctrl</kbd> + <kbd>c</kbd>. | ||
|
||
10. Start the Bats test with `bats ./tests/test.bats`. | ||
|
||
For a more detailed documentation about `tmate` see [Debug your GitHub Actions by using tmate](https://mxschmitt.github.io/action-tmate/). | ||
|
||
**Contributed and maintained by `@CONTRIBUTOR`** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# How to debug tests (Github Actions) | ||
|
||
1. You need an SSH-key registered with GitHub. You either pick the key you have already used with `github.com` or you create a dedicated new one with `ssh-keygen -t ed25519 -a 64 -f tmate_ed25519 -C "$(date +'%d-%m-%Y')"` and add it at `https://github.com/settings/keys`. | ||
|
||
2. Add the following snippet to `~/.ssh/config`: | ||
|
||
``` | ||
Host *.tmate.io | ||
User git | ||
AddKeysToAgent yes | ||
UseKeychain yes | ||
PreferredAuthentications publickey | ||
IdentitiesOnly yes | ||
IdentityFile ~/.ssh/tmate_ed25519 | ||
``` | ||
3. Go to `https://github.com/<user>/<repo>/actions/workflows/tests.yml`. | ||
|
||
4. Click the `Run workflow` button and you will have the option to select the branch to run the workflow from and activate `tmate` by checking the `Debug with tmate` checkbox for this run. | ||
|
||
![tmate](images/gh-tmate.jpg) | ||
|
||
5. After the `workflow_dispatch` event was triggered, click the `All workflows` link in the sidebar and then click the `tests` action in progress workflow. | ||
|
||
7. Pick one of the jobs in progress in the sidebar. | ||
|
||
8. Wait until the current task list reaches the `tmate debugging session` section and the output shows something like: | ||
|
||
``` | ||
106 SSH: ssh [email protected] | ||
107 or: ssh -i <path-to-private-SSH-key> [email protected] | ||
108 SSH: ssh [email protected] | ||
109 or: ssh -i <path-to-private-SSH-key> [email protected] | ||
``` | ||
|
||
9. Copy and execute the first option `ssh [email protected]` in the terminal and continue by pressing either <kbd>q</kbd> or <kbd>Ctrl</kbd> + <kbd>c</kbd>. | ||
|
||
10. Start the Bats test with `bats ./tests/test.bats`. | ||
|
||
For a more detailed documentation about `tmate` see [Debug your GitHub Actions by using tmate](https://mxschmitt.github.io/action-tmate/). |