Skip to content

Commit

Permalink
👷 Preview builds using pkg.pr.new (#5391)
Browse files Browse the repository at this point in the history
**Description**

<!-- Please provide a short description and potentially linked issues
justifying the need for this PR -->

The GitHub Application `pkg.pr.new` is responsible to help into
previewing packages as they get developped. It could be seen as a
possible alternative to the current codesandbox option that we have been
using until now.

This PR aims into giving it a try to see how it behaves against our
monorepo.

<!-- * Your PR is fixing a bug or regression? Check for existing issues
related to this bug and link them -->
<!-- * Your PR is adding a new feature? Make sure there is a related
issue or discussion attached to it -->

<!-- You can provide any additional context to help into understanding
what's this PR is attempting to solve: reproduction of a bug, code
snippets... -->

**Checklist** — _Don't delete this checklist and make sure you do the
following before opening the PR_

- [x] The name of my PR follows [gitmoji](https://gitmoji.dev/)
specification
- [x] My PR references one of several related issues (if any)
- [x] New features or breaking changes must come with an associated
Issue or Discussion
- [x] My PR does not add any new dependency without an associated Issue
or Discussion
- [x] My PR includes bumps details, please run `yarn bump` and flag the
impacts properly
- [x] My PR adds relevant tests and they would have failed without my PR
(when applicable)

<!-- More about contributing at
https://github.com/dubzzz/fast-check/blob/main/CONTRIBUTING.md -->

**Advanced**

<!-- How to fill the advanced section is detailed below! -->

- [x] Category: 👷 Build tool
- [x] Impacts: Replacing codesandbox build

<!-- [Category] Please use one of the categories below, it will help us
into better understanding the urgency of the PR -->
<!-- * ✨ Introduce new features -->
<!-- * 📝 Add or update documentation -->
<!-- * ✅ Add or update tests -->
<!-- * 🐛 Fix a bug -->
<!-- * 🏷️ Add or update types -->
<!-- * ⚡️ Improve performance -->
<!-- * _Other(s):_ ... -->

<!-- [Impacts] Please provide a comma separated list of the potential
impacts that might be introduced by this change -->
<!-- * Generated values: Can your change impact any of the existing
generators in terms of generated values, if so which ones? when? -->
<!-- * Shrink values: Can your change impact any of the existing
generators in terms of shrink values, if so which ones? when? -->
<!-- * Performance: Can it require some typings changes on user side?
Please give more details -->
<!-- * Typings: Is there a potential performance impact? In which cases?
-->
  • Loading branch information
dubzzz authored Nov 1, 2024
1 parent 252853f commit 85e4927
Show file tree
Hide file tree
Showing 4 changed files with 403 additions and 20 deletions.
14 changes: 0 additions & 14 deletions .codesandbox/ci.json

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/build-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,36 @@ jobs:
run: yarn unpack:all
- name: Typecheck
run: yarn workspaces foreach --all -pvi run typecheck
preview:
name: 'Preview'
needs:
- warmup_yarn_cache
- production_packages
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Using Node v20.x
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '20.x'
cache: 'yarn'
cache-dependency-path: yarn.lock
check-latest: true
- name: Install dependencies
env:
YARN_ENABLE_OFFLINE_MODE: 1
YARN_ENABLE_HARDENED_MODE: 0
run: yarn install --immutable --immutable-cache --mode=skip-build
- name: Download production packages
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: bundles
path: packages/
- name: Unpack production packages
run: yarn unpack:all
- name: Preview
run: yarn dlx pkg-pr-new publish --compact './packages/*'
test:
name: 'Test'
needs:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"globals": "^15.11.0",
"pkg-pr-new": "^0.0.30",
"prettier": "3.3.3",
"publint": "^0.2.12",
"typescript": "~5.6.3",
Expand Down
Loading

0 comments on commit 85e4927

Please sign in to comment.