mirror of
https://github.com/transloadit/uppy.git
synced 2026-01-22 18:16:26 +00:00
Remove output compare GitHub Action (#6081)
This was nice when we were gradually migrating the codebase to
TypeScript so we could see if we changed a file from `.js` to `.ts` the
actual output remained the same, even when GitHub shows the entire diff
changed.
But now everything is TS and we aren't doing any JS to TS file changes
so we might as well remove this from CI.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Removes the `.github/workflows/e2e.yml` GitHub Actions job that
compared built `packages/@uppy/*/lib` outputs and posted diffs to PRs.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f5d6a74970. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
This commit is contained in:
parent
556e36de4c
commit
32eb01e1b4
1 changed files with 0 additions and 115 deletions
115
.github/workflows/e2e.yml
vendored
115
.github/workflows/e2e.yml
vendored
|
|
@ -1,115 +0,0 @@
|
|||
name: Output
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.d.ts'
|
||||
- 'examples/**'
|
||||
- 'private/**'
|
||||
- 'website/**'
|
||||
- '.github/**'
|
||||
- '!.github/workflows/e2e.yml'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- '**.d.ts'
|
||||
- 'examples/**'
|
||||
- 'private/**'
|
||||
- 'website/**'
|
||||
- '.github/**'
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
env:
|
||||
YARN_ENABLE_GLOBAL_CACHE: false
|
||||
|
||||
jobs:
|
||||
compare_diff:
|
||||
name: Diff lib folders
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DIFF_BUILDER: true
|
||||
outputs:
|
||||
diff: ${{ steps.diff.outputs.OUTPUT_DIFF }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 2
|
||||
ref: ${{ github.event.pull_request && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.sha }}
|
||||
- run: git reset HEAD^ --hard
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run:
|
||||
echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: lts/*
|
||||
- run: corepack yarn install
|
||||
env:
|
||||
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
|
||||
CYPRESS_INSTALL_BINARY: 0
|
||||
- run: corepack yarn build
|
||||
- name: Store output file
|
||||
run: tar cf /tmp/previousVersion.tar packages/@uppy/*/lib
|
||||
- name: Fetch source from the PR
|
||||
run: |
|
||||
git checkout FETCH_HEAD -- packages
|
||||
- run: corepack yarn install --no-immutable
|
||||
env:
|
||||
# https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
|
||||
CYPRESS_INSTALL_BINARY: 0
|
||||
- run: corepack yarn build
|
||||
- name: Store output file
|
||||
run: tar cf /tmp/newVersion.tar packages/@uppy/*/lib
|
||||
- name: Setup git
|
||||
run: |
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
git init /tmp/uppy
|
||||
echo '*.map' > /tmp/uppy/.gitignore
|
||||
- name: Install dformat
|
||||
run: |
|
||||
curl -fsSL https://dprint.dev/install.sh | sh
|
||||
cd /tmp/uppy && echo '{"plugins":[]}' > dprint.json && "$HOME/.dprint/bin/dprint" config add typescript
|
||||
- name: Extract previous version
|
||||
run: cd /tmp/uppy && tar xf /tmp/previousVersion.tar
|
||||
- name: Format previous output code
|
||||
run: cd /tmp/uppy && "$HOME/.dprint/bin/dprint" fmt **/*.js
|
||||
- name: Commit previous version
|
||||
run: cd /tmp/uppy && git add -A . && git commit -m 'previous version'
|
||||
- name: Extract new version
|
||||
run: cd /tmp/uppy && tar xf /tmp/newVersion.tar
|
||||
- name: Format new output code
|
||||
run: cd /tmp/uppy && "$HOME/.dprint/bin/dprint" fmt **/*.js
|
||||
- name: Build diff
|
||||
id: diff
|
||||
run: |
|
||||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
|
||||
echo "OUTPUT_DIFF<<$EOF" >> "$GITHUB_OUTPUT"
|
||||
cd /tmp/uppy && git --no-pager diff >> "$GITHUB_OUTPUT"
|
||||
echo "$EOF" >> "$GITHUB_OUTPUT"
|
||||
- name: Add/update comment
|
||||
if: github.event.pull_request
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
message: |
|
||||
<details><summary>Diff output files</summary>
|
||||
|
||||
```diff
|
||||
${{ steps.diff.outputs.OUTPUT_DIFF || 'No diff' }}
|
||||
```
|
||||
|
||||
</details>
|
||||
Loading…
Add table
Add a link
Reference in a new issue