-
Notifications
You must be signed in to change notification settings - Fork 701
Infra: build create-spectacle examples #1185
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
23e8be5
Move jest to root
ryan-roemer 9d8fde5
Add sample JS build
ryan-roemer a708bb7
Hacky, but works in localdev
ryan-roemer fbc1607
Add CI workflow
ryan-roemer 061b86f
Fix prettier
ryan-roemer 1f28aa9
Harmonize names to options
ryan-roemer d1b2108
Fix create
ryan-roemer 8042ab4
Try to exec puppeteer in CI. Will fail.
ryan-roemer 7894645
Let's see if the puppeteer test actually works.
ryan-roemer e03821d
Only close if browser exists
ryan-roemer 9a8d187
CI fixes
ryan-roemer 6026720
Fix up scripts more
ryan-roemer 9df35c1
More wireit config
ryan-roemer 588f1e2
Add tsx scenario
ryan-roemer 0905ac1
Add onepage
ryan-roemer dd81b68
Abstract launch starter and get localdev supported.
ryan-roemer 7f508c4
Various cleanup
ryan-roemer fcc19de
Convert tests to TS
ryan-roemer c997a81
Add more contributing notes
ryan-roemer 424dbc0
Remove comment
ryan-roemer fd41e17
PR feedback. Split out create-spectacle CI.
ryan-roemer 3d09833
Remove old create task
ryan-roemer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: create-spectacle | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "packages/create-spectacle/**" | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "packages/create-spectacle/**" | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Create, build, and install | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [18.x] | ||
| create-type: ['jsx', 'tsx', 'onepage'] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| # Wireit cache | ||
| - uses: google/wireit@setup-github-actions-caching/v1 | ||
|
|
||
| - uses: pnpm/action-setup@v2.2.2 | ||
| with: | ||
| version: 7 | ||
|
|
||
| - name: Get pnpm store directory | ||
| id: pnpm-cache | ||
| run: echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
|
|
||
| - name: Setup pnpm cache | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('./pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pnpm-store- | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Build create-spectacle | ||
| run: pnpm run --filter ./packages/create-spectacle build | ||
|
|
||
| # Create, build, isntall a full example. | ||
| # Then, start a background dev server. | ||
| - name: Create example - ${{ matrix.create-type }} | ||
| working-directory: ./packages/create-spectacle | ||
| run: | | ||
| pnpm run examples:${{ matrix.create-type }}:create && \ | ||
| pnpm run examples:${{ matrix.create-type }}:install && \ | ||
| pnpm run examples:${{ matrix.create-type }}:build && \ | ||
| pnpm run examples:${{ matrix.create-type }}:start & | ||
|
|
||
| # Wait until the dev server is full up and running and then test. | ||
| - name: Test example - ${{ matrix.create-type }} | ||
| working-directory: ./packages/create-spectacle | ||
| run: | | ||
| pnpm exec wait-on http-get://localhost:3000 && \ | ||
| pnpm run examples:test |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,8 @@ dist | |
| lib | ||
| es | ||
| bin | ||
| .puppeteer | ||
| .examples | ||
|
|
||
| # Pack-ing artifacts | ||
| packages/**/package | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.