Skip to content

Add steps for ensuring pre-commit hooks are installed #416

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

Merged
merged 28 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e5fa18d
Add steps for ensuring pre-commit hooks are installed
dragid10 Sep 16, 2024
e24f6db
Add .idea folder to gitignore
dragid10 Sep 16, 2024
d8f16b8
Add steps for running tests and linters/formatters
dragid10 Sep 16, 2024
38cd5c0
Merge remote-tracking branch 'upstream/gh-pages' into gh-pages
dragid10 Sep 22, 2024
2108766
Retain trace logs on failure
dragid10 Sep 22, 2024
db952b3
Add tracing to playwright tests
dragid10 Sep 22, 2024
63d46d5
Run tracing action regardless of test status
dragid10 Sep 22, 2024
53bd37f
Fix folder where test results will upload
dragid10 Sep 22, 2024
bea0117
Use proper tests dir
dragid10 Sep 22, 2024
d6a5b28
Actually turn on tracing and upload the resulting failed results
dragid10 Sep 22, 2024
2d3870c
Use jekyll serve detach command
dragid10 Sep 22, 2024
5bf3807
Add macos, jetbranins and vscode to gitignore
dragid10 Sep 22, 2024
ad7f414
Remove sleep fixture
dragid10 Sep 22, 2024
d44ff4f
Use standard python comparison operator
dragid10 Sep 22, 2024
3605f87
Add explanation to test assertion
dragid10 Sep 22, 2024
90e624c
Fix linting issues
dragid10 Sep 22, 2024
07fc1ab
Merge pull request #1 from dragid10/fix-playwright-tests
dragid10 Sep 22, 2024
7222b89
Merge branch 'gh-pages' into gh-pages
dragid10 Sep 29, 2024
937529c
Pull upstream changes
dragid10 Sep 30, 2024
349509e
Use white theme for images
dragid10 Sep 30, 2024
bebee3a
Remake changes in CONTRIBUTING file
dragid10 Sep 30, 2024
3851a17
Remove unneeded test-results folder
dragid10 Sep 30, 2024
a02f0c7
Revert .gitignore
dragid10 Sep 30, 2024
3ad0efa
Revert to base readme
dragid10 Sep 30, 2024
1f1a87b
Merge branch 'upstream-gh-pages' into gh-pages
dragid10 Sep 30, 2024
a04d7c0
Use white theme to stay consistent
dragid10 Sep 30, 2024
6c25c62
Increase GH action job to 30 mins
dragid10 Sep 30, 2024
368e725
Run linter to fix linting errors
dragid10 Sep 30, 2024
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
30 changes: 15 additions & 15 deletions .github/workflows/conference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ jobs:
automated pr
add_comment:
runs-on: ubuntu-latest

steps:
- name: Add comment to the issue
uses: actions/github-script@v6
if: ${{ github.event.issue.user.type != 'User' }} #adds comment only if the issue is created by a bot
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issueNumber = context.payload.issue.number;
const comment = "Automated issue, no action is required."
github.issues.createComment({
...context.repo,
issue_number: issueNumber,
body: comment
});
- name: Add comment to the issue
uses: actions/github-script@v6
if: ${{ github.event.issue.user.type != 'User' }} #adds comment only if the issue is created by a bot
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issueNumber = context.payload.issue.number;
const comment = "Automated issue, no action is required."

github.issues.createComment({
...context.repo,
issue_number: issueNumber,
body: comment
});
1 change: 1 addition & 0 deletions .github/workflows/playwright.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

@dragid10 - should it take 30 minutes? I don't think I've seen it take that long ever

Copy link
Member Author

Choose a reason for hiding this comment

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

I doubt it would, but as I was testing some changes on the GH actions, I found out that it has a very long (or no) timeout. So if something funky starts happening, then I'd like to kill the actions job in a reasonable amount of time

Copy link
Contributor

Choose a reason for hiding this comment

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

I would consider like maybe 10 minutes then. I really don't imaging it getting much longer than that (of course until it does)

Copy link
Contributor

@kjaymiller kjaymiller Sep 30, 2024

Choose a reason for hiding this comment

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

but that can be added in a new issue. Great work on this one!

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:

jobs:
test:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
38 changes: 36 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@ Follow these steps and note these guidelines to begin contributing:

![Bundle install terminal](/assets/images/bundle_install_terminal.png)

- After installing the dependencies, its time to run the application. We do this by running the command `bundle exec jekyll serve` or run the default **Build Task** <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd>:
- Afterwards, run the command `pip install -r requirements-dev.txt` to install the python dev dependencies.

![Pip install terminal](/assets/images/pip_install_terminal.png)

- Install the pre-commit hooks to automatically format the code before committing. Run the command `pre-commit install`:

![Pre-commit install terminal](/assets/images/pre-commit_install_terminal.png)

- After installing the dependencies, its time to run the application. We do this by running the command `bundle exec jekyll serve --detach` or run the default **Build Task** <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd>:

![Jekyll serve terminal](/assets/images/jekyll_serve_terminal.png)

Expand All @@ -70,6 +78,32 @@ Follow these steps and note these guidelines to begin contributing:

![Running page](/assets/images/running_page.png)

- Test your changes (create new tests as needed)
### Testing Changes (create new tests as needed)

- To run the test suites for the codebase

- Ensure the site is running locally with `bundle exec jekyll serve --detach`. This will run the server in the background, and any content changes will immediately reflect on the site.

![Jekyll serve terminal](/assets/images/jekyll_serve_terminal.png)

- If you need to restart the server, you can run `pkill -f jekyll` to stop the server and then run `bundle exec jekyll serve --detach` to start the server again.

- Run all tests in the test-suite with the command `python3 -m pytest`:

![Pytest terminal](/assets/images/pytest_run_terminal.png)

### Pushing Changes

- Run `pre-commit run --all` to ensure your code is formatted and linted correctly before pushing your changes.

![Pre-commit run terminal](/assets/images/pre-commit_run_terminal.png)

- Run `git commit -m "<Your commit message>"` to commit your changes.

![Git commit terminal](/assets/images/git_commit_terminal.png)

- Finally run `git push origin <your-branch-name>` to push your changes to your fork.

![Git push terminal](/assets/images/git_push_terminal.png)

- Once you’ve committed and pushed all of your changes to GitHub, go to the page for your fork on GitHub, select your development branch, and click the pull request button. Please ensure that you compare your feature branch to the desired branch of the repo you are supposed to make a PR to. If you need to make any adjustments to your pull request, just push the updates to GitHub. Your pull request will automatically track the changes in your development branch and update it. 🥳
Binary file added assets/images/git_commit_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/git_push_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/jekyll_serve_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/pip_install_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/pre-commit_install_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/pre-commit_run_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/pytest_run_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading