Skip to content

Commit

Permalink
Add push dist to allow direct testing of addon on github
Browse files Browse the repository at this point in the history
  • Loading branch information
cloke committed Sep 9, 2024
1 parent 14efaf5 commit de8a4b7
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 20 deletions.
26 changes: 26 additions & 0 deletions .github/actions/assert-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Assert Assets Exists
description: Build the package and assert that file contents exist as we expect
runs:
using: "composite"
steps:
- name: Build and Assert Output
shell: bash
run: |-
echo '
target: ember-scroll-modifiers/
setup:
run: pnpm build
cwd: ./ember-scroll-modifiers
expect: |
dist/index.mjs
dist/index.mjs.map
declarations/index.d.ts
' >> assert-contents.config.yml
npx assert-folder-contents
- name: Upload dist assets to cache
uses: actions/upload-artifact@v4
with:
name: dist
path: ${{ env.dist }}
10 changes: 10 additions & 0 deletions .github/actions/download-built-package/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Download built package from cache
description: Download built package from cache
runs:
using: "composite"
steps:
- name: Download built package from cache
uses: actions/download-artifact@v4
with:
name: dist
path: ${{ env.dist }}
40 changes: 20 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

env:
CI: true
dist: ember-apache-echarts/dist
dist: ember-scroll-modifiers/dist

jobs:
install_dependencies:
Expand Down Expand Up @@ -113,22 +113,22 @@ jobs:
node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
--skip-cleanup
MeasureAssetSizes:
name: Measure Asset Sizes
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- uses: ./.github/actions/download-built-package
- name: measure asset sizes
run: node ./dev/estimate-bytes/index.js
- name: comment on PR
uses: marocchino/sticky-pull-request-comment@v2
with:
header: asset-sizes
path: ./dev/estimate-bytes/comment.txt
# MeasureAssetSizes:
# name: Measure Asset Sizes
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@v4
# with:
# persist-credentials: false
# - uses: wyvox/action-setup-pnpm@v3
# with:
# node-version: 18.18.1
# - uses: ./.github/actions/download-built-package
# - name: measure asset sizes
# run: node ./dev/estimate-bytes/index.js
# - name: comment on PR
# uses: marocchino/sticky-pull-request-comment@v2
# with:
# header: asset-sizes
# path: ./dev/estimate-bytes/comment.txt

0 comments on commit de8a4b7

Please sign in to comment.