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 GIFs to CI via vhs-action #3810

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add GIFs to CI via vhs-action #3810

wants to merge 2 commits into from

Conversation

nekevss
Copy link
Member

@nekevss nekevss commented Apr 14, 2024

This Pull Request is to propose adding a GIF to boa_cli and the vhs-action CI to update the GIF in CI.

With vhs-action, we could also look into automating more GIFs for our docs that can be built out during the artifacts CI.

The one unfortunate thing is that the GIF generation for boa_cli won't take in any changes from boa_engine as it is set to the currently released version in it's Cargo.toml.

I am also a bit concerned about stefanzweifel/git-auto-commit-action@v4 as I'm not entirely sure how it will affect the commit history.

EDIT: VHS can be found here for reference

@nekevss nekevss added documentation update documentation cli Issues and PRs related to the Boa command line interface. github_actions Pull requests that update Github_actions code labels Apr 14, 2024
@nekevss nekevss requested a review from a team April 14, 2024 23:34
Copy link

github-actions bot commented Apr 14, 2024

Test262 conformance changes

Test result main count PR count difference
Total 50,731 50,731 0
Passed 42,973 42,973 0
Ignored 1,395 1,395 0
Failed 6,363 6,363 0
Panics 18 18 0
Conformance 84.71% 84.71% 0.00%

Comment on lines 9 to 31
build_cli_tape:
name: Generate boa_cli GIF
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo install --path ./cli
# Below is from vhs-actions examples
# https://github.com/charmbracelet/vhs-action/blob/main/examples/auto-commit.yml
- uses: charmbracelet/vhs-action@v1
with:
path: './.github/tapes/boa_cli.tape'
- uses: stefanzweifel/git-auto-commit-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: Update generated VHS GIF
branch: main
commit_user_name: vhs-action 📼
commit_user_email: actions@github.com
commit_author: vhs-action 📼 <actions@github.com>
file_pattern: '*.gif'
Copy link
Member

@jedel1043 jedel1043 Apr 15, 2024

Choose a reason for hiding this comment

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

Was thinking more about this, and maybe this shouldn't be a direct commit, but a check on the PRs that compares the current version of the GIF with the GIF generated by the tool, and throws if both differ.

@nekevss nekevss force-pushed the add-vhs-ci branch 2 times, most recently from d88ac4c to 9282888 Compare April 20, 2024 00:18
@Razican
Copy link
Member

Razican commented May 20, 2024

We could maybe only enable it for PRs, since when we merge into main, we squash the commits. That would make it easier to preserve a reasonable history.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Issues and PRs related to the Boa command line interface. documentation update documentation github_actions Pull requests that update Github_actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants