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

Add a section how to debug Github Actions with tmate to the README.md #29

Merged
merged 3 commits into from
Sep 5, 2023

Conversation

rpkoller
Copy link
Contributor

@rpkoller rpkoller commented Jul 8, 2023

The Issue

An initial draft for adding instructions how to debug Github Actions with tmate to the project's README.md file. I am uncertain if the steps i've listed are too granular. But it covers stepping stones i've personally ran into as well as guidance for github'S workflow interface you have to click through to get to the current task list for a job - that is sort of suboptimal and unintuitive. therefore i went with the a bit more verbose write up. But all input and feedback is welcome. thanks.

p.s. after finishing and agreeing on the documentation for the addon-template i will go on add an addition to ddev.readthedocs.com as well as discussed on discord.

How This PR Solves The Issue

Manual Testing Instructions

Automated Testing Overview

Related Issue Link(s)

Release/Deployment Notes

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

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

Thanks! Minor suggestions.

@@ -46,6 +47,45 @@ A repository like this one is the way to get started. You can create a new repo

Note that more advanced techniques are discussed in [DDEV docs](https://ddev.readthedocs.io/en/latest/users/extend/additional-services/#additional-service-configurations-and-add-ons-for-ddev).

## How to debug in Github Actions
1. You need a SSH-key registered with Github. You either pick the key you already authenticate 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`.
Copy link
Member

Choose a reason for hiding this comment

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

I think it's best to streamline this with "Use a key that is configured with github" and give a link to Github's docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm registered is suboptimal i agree but configured with github is also unprecise. github is using the terminology of "associated with your account". maybe something like:

You need a SSH-key associated with your GitHub account. You either pick the key you already use on 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 to https://github.com/settings/keys.

Copy link
Member

Choose a reason for hiding this comment

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

That explanation works for me, thanks.

## How to debug in Github Actions
1. You need a SSH-key registered with Github. You either pick the key you already authenticate 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`
Copy link
Member

Choose a reason for hiding this comment

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

This step is unnecessary normally, but perhaps you have gobs of keys.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in that case i consider it useful because with the wildcard you make sure that the different subdomains are all covered with the same ssh key. and i struggled at the beginning because i'Ve used the specific domain and subdomain and then ran into another one.

Copy link
Member

Choose a reason for hiding this comment

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

I typically only have a single ssh key ever configured on github.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved

10. Start the bats test with `bats tests/test.bats`.

For a more detailed documentation about `tmate` see [Debug your GitHubActions by using tmate](https://mxschmitt.github.io/action-tmate/)
Copy link
Member

Choose a reason for hiding this comment

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

Another whole section could be about how to actually debug bats, which I think you're working on here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i agree a dedicated section about bats might be helpful. but i have to admit i haven't thought nor was working on it. i am in lack of bats expertise also. the tests i'Ve used for spidergram were more than basic and rudimental.

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

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

I think it's important to get this in. I'll pull now, cleanups are welcome.

@rfay rfay merged commit 23447ca into ddev:main Sep 5, 2023
2 checks passed
@rpkoller rpkoller deleted the 20230708-tmate branch September 6, 2023 01:19
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