fix(deps): downgrade flowbite to v2.5.2 in package.json and package-lock.json #133
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
name: Update Snapshots on Comment | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
comment-action-start: | |
name: Comment action started | |
runs-on: ubuntu-latest | |
if: github.event.issue.pull_request && contains(github.event.comment.body, '/approve-snapshots') && github.event.comment.author_association == 'MEMBER' | |
outputs: | |
pr_head: ${{ steps.comment-branch.outputs.head_ref }} | |
steps: | |
- name: Get branch of PR | |
uses: xt0rted/pull-request-comment-branch@v3 | |
id: comment-branch | |
- name: Get Thymis App Token | |
id: generate-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ vars.THYMIS_APP_ID }} | |
private-key: ${{ secrets.THYMIS_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
ref: ${{ steps.comment-branch.outputs.head_ref }} | |
- name: Comment action started | |
uses: thollander/actions-comment-pull-request@v3 | |
with: | |
message: | | |
### Updating snapshots. Click [here](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) to see the status. | |
comment-tag: playwright-snapshots-update | |
mode: recreate | |
github-token: ${{ steps.generate-token.outputs.token }} | |
update-snapshots-aarch64: | |
name: Update Snapshots aarch64 | |
if: github.event.issue.pull_request && contains(github.event.comment.body, '/approve-snapshots') && github.event.comment.author_association == 'MEMBER' | |
runs-on: ubuntu-22.04-arm | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Get branch of PR | |
uses: xt0rted/pull-request-comment-branch@v3 | |
id: comment-branch | |
- name: Get Thymis App Token | |
id: generate-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ vars.THYMIS_APP_ID }} | |
private-key: ${{ secrets.THYMIS_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
ref: ${{ steps.comment-branch.outputs.head_ref }} | |
- uses: ./.github/actions/setup-nix | |
with: | |
attic_token: ${{ secrets.ATTIC_TOKEN }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: | | |
npm ci | |
working-directory: frontend | |
- name: Build application | |
run: | | |
nix build .#thymis-controller | |
- name: Run tests | |
run: | | |
nix develop .#forNpmTesting --command npm run test:integration -- --update-snapshots | |
working-directory: frontend | |
- name: Upload Playwright report | |
uses: actions/upload-artifact@v4 | |
id: artifact-upload-aarch64 | |
if: always() | |
with: | |
name: playwright-report-aarch64 | |
path: frontend/playwright-report/ | |
retention-days: 30 | |
- name: Upload snapshots screencaps | |
uses: actions/upload-artifact@v4 | |
with: | |
name: updated-snapshots-aarch64-screencaps | |
path: frontend/tests/screencaps.spec.ts-snapshots/ | |
- name: Upload snapshots unauthenticated | |
uses: actions/upload-artifact@v4 | |
with: | |
name: updated-snapshots-aarch64-unauthenticated | |
path: frontend/tests/unauthenticated.spec.ts-snapshots/ | |
update-snapshots-x86_64: | |
name: Update Snapshots x86_64 | |
if: github.event.issue.pull_request && contains(github.event.comment.body, '/approve-snapshots') && github.event.comment.author_association == 'MEMBER' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Get branch of PR | |
uses: xt0rted/pull-request-comment-branch@v3 | |
id: comment-branch | |
- name: Get Thymis App Token | |
id: generate-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ vars.THYMIS_APP_ID }} | |
private-key: ${{ secrets.THYMIS_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
ref: ${{ steps.comment-branch.outputs.head_ref }} | |
- uses: ./.github/actions/setup-nix | |
with: | |
attic_token: ${{ secrets.ATTIC_TOKEN }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: | | |
npm ci | |
working-directory: frontend | |
- name: Build application | |
run: | | |
nix build .#thymis-controller | |
- name: Run tests | |
run: | | |
if [ -f "tests/x86_vm.spec.ts" ]; then | |
nix develop .#forNpmTesting --command npm run test:integration -- --update-snapshots "tests/x86_vm.spec.ts" | |
fi | |
working-directory: frontend | |
- name: Upload Playwright report | |
uses: actions/upload-artifact@v4 | |
id: artifact-upload-x86_64 | |
if: always() | |
with: | |
name: playwright-report-x86_64 | |
path: frontend/playwright-report/ | |
retention-days: 30 | |
- name: Upload updated snapshots | |
uses: actions/upload-artifact@v4 | |
with: | |
name: updated-snapshots-x86_vm | |
path: frontend/tests/x86_vm.spec.ts-snapshots/ | |
upload-artifacts: | |
name: Upload Artifacts | |
runs-on: ubuntu-latest | |
needs: [comment-action-start, update-snapshots-aarch64, update-snapshots-x86_64] | |
steps: | |
- name: Get Thymis App Token | |
id: generate-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ vars.THYMIS_APP_ID }} | |
private-key: ${{ secrets.THYMIS_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
ref: ${{ needs.comment-action-start.outputs.pr_head }} | |
- name: Download updated snapshots aarch64-screencaps | |
uses: actions/download-artifact@v4 | |
with: | |
name: updated-snapshots-aarch64-screencaps | |
path: frontend/tests/screencaps.spec.ts-snapshots/ | |
- name: Download updated snapshots aarch64-unauthenticated | |
uses: actions/download-artifact@v4 | |
with: | |
name: updated-snapshots-aarch64-unauthenticated | |
path: frontend/tests/unauthenticated.spec.ts-snapshots/ | |
- name: Download updated snapshots x86_vm | |
uses: actions/download-artifact@v4 | |
with: | |
name: updated-snapshots-x86_vm | |
path: frontend/tests/x86_vm.spec.ts-snapshots/ | |
- name: commit and push | |
env: | |
GH_TOKEN: ${{ steps.generate-token.outputs.token }} | |
BRANCH_NAME: ${{ needs.comment-action-start.outputs.pr_head }} | |
run: | | |
USER_NAME=${{ steps.generate-token.outputs.app-slug }}[bot] | |
USER_ID=$(gh api "/users/${USER_NAME}" --jq '.id') | |
USER_EMAIL="${USER_ID}+${{ steps.generate-token.outputs.app-slug }}[bot]@users.noreply.github.com" | |
git config user.email $USER_EMAIL | |
git config user.name $USER_NAME | |
git add . | |
git commit -m "Update e2e snapshots" | |
git push |