mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 05:51:51 +08:00
Levitate: Update workflow to find type declaration via package.json (#53539)
* refactor(breaking-changes): make sure to pack and zip tarballed packages before artifact upload * feat(check-breaking-changes): support extracting npm package tarballs before comparing packages * chore(breaking-changes): fix typo preventing upload of pr_built_packages.zip
This commit is contained in:
@ -34,8 +34,11 @@ jobs:
|
|||||||
- name: Build packages
|
- name: Build packages
|
||||||
run: yarn packages:build
|
run: yarn packages:build
|
||||||
|
|
||||||
- name: Zip built packages
|
- name: Pack packages
|
||||||
run: zip -r ./pr_built_packages.zip ./packages/**/dist
|
run: yarn packages:pack --out ./%s.tgz
|
||||||
|
|
||||||
|
- name: Zip built tarballed packages
|
||||||
|
run: zip -r ./pr_built_packages.zip ./packages/**/*.tgz
|
||||||
|
|
||||||
- name: Upload build output as artifact
|
- name: Upload build output as artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@ -75,8 +78,11 @@ jobs:
|
|||||||
- name: Build packages
|
- name: Build packages
|
||||||
run: yarn packages:build
|
run: yarn packages:build
|
||||||
|
|
||||||
- name: Zip built packages
|
- name: Pack packages
|
||||||
run: zip -r ./base_built_packages.zip ./packages/**/dist
|
run: yarn packages:pack --out ./%s.tgz
|
||||||
|
|
||||||
|
- name: Zip built tarballed packages
|
||||||
|
run: zip -r ./base_built_packages.zip ./packages/**/*.tgz
|
||||||
|
|
||||||
- name: Upload build output as artifact
|
- name: Upload build output as artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@ -105,10 +111,10 @@ jobs:
|
|||||||
name: buildBase
|
name: buildBase
|
||||||
|
|
||||||
- name: Unzip artifact from pr
|
- name: Unzip artifact from pr
|
||||||
run: unzip pr_built_packages.zip -d ./pr && rm pr_built_packages.zip
|
run: unzip -j pr_built_packages.zip -d ./pr && rm pr_built_packages.zip
|
||||||
|
|
||||||
- name: Unzip artifact from base
|
- name: Unzip artifact from base
|
||||||
run: unzip base_built_packages.zip -d ./base && rm base_built_packages.zip
|
run: unzip -j base_built_packages.zip -d ./base && rm base_built_packages.zip
|
||||||
|
|
||||||
- name: Get link for the Github Action job
|
- name: Get link for the Github Action job
|
||||||
id: job
|
id: job
|
||||||
|
@ -12,14 +12,20 @@ while IFS=" " read -r -a package; do
|
|||||||
PACKAGE_PATH=$(basename "$package")
|
PACKAGE_PATH=$(basename "$package")
|
||||||
|
|
||||||
# Calculate current and previous package paths / names
|
# Calculate current and previous package paths / names
|
||||||
PREV="./base/packages/$PACKAGE_PATH/dist/"
|
PREV="./base/$PACKAGE_PATH"
|
||||||
CURRENT="./pr/packages/$PACKAGE_PATH/dist/"
|
CURRENT="./pr/$PACKAGE_PATH"
|
||||||
|
|
||||||
# Temporarily skipping these packages as they don't have any exposed static typing
|
# Temporarily skipping these packages as they don't have any exposed static typing
|
||||||
if [[ "$PACKAGE_PATH" == 'grafana-toolkit' || "$PACKAGE_PATH" == 'jaeger-ui-components' ]]; then
|
if [[ "$PACKAGE_PATH" == 'grafana-toolkit' || "$PACKAGE_PATH" == 'jaeger-ui-components' ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Extract the npm package tarballs into separate directories e.g. ./base/@grafana-data.tgz -> ./base/grafana-data/
|
||||||
|
mkdir $PREV
|
||||||
|
tar -xf ./base/@$PACKAGE_PATH.tgz --strip-components=1 -C $PREV
|
||||||
|
mkdir $CURRENT
|
||||||
|
tar -xf ./pr/@$PACKAGE_PATH.tgz --strip-components=1 -C $CURRENT
|
||||||
|
|
||||||
# Run the comparison and record the exit code
|
# Run the comparison and record the exit code
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
Reference in New Issue
Block a user