-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modernize scaffold * Add PR template * Fix tests * Fix tests * Update README.md * Bump deps * Update read-pkg-up usage * Fix tests * Fix tests * Rename webpack tests * Disable PR trigger * Move tests * Fix npm-alias test * Update entry * Clean up
- Loading branch information
Showing
51 changed files
with
9,713 additions
and
3,863 deletions.
There are no files selected for viewing
This file contains 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,27 @@ | ||
## Summary | ||
|
||
<!-- Explain the purpose of this pull request in one line. --> | ||
|
||
## Changelog | ||
|
||
### Fixed/Added/Changed | ||
|
||
<!-- Copy and paste the entry from CHANGELOG.md. --> | ||
|
||
## Design considerations | ||
|
||
<!-- Explains how we come up with the final design and design candidates (if any). --> | ||
|
||
## Specific changes | ||
|
||
<!-- Explains what changed in details. --> | ||
|
||
- | ||
|
||
## Reminders | ||
|
||
<!-- Checks all boxes even if it is irrelevant to this pull request. --> | ||
|
||
- [ ] I have updated `CHANGELOG.md` | ||
- [ ] I have added tests for new code | ||
- [ ] I have updated documentations |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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,98 @@ | ||
name: pull request validation | ||
|
||
on: | ||
pull_request: | ||
|
||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version' | ||
required: true | ||
default: 'main' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: ['12', '14', '16'] | ||
npm-version: [default, latest] | ||
|
||
steps: | ||
- name: Checking out for ${{ github.ref }} | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install latest NPM | ||
if: ${{ matrix.npm-version == 'latest' }} | ||
run: npm install -g npm | ||
|
||
- run: | | ||
npm ci | ||
npm run prepublishOnly | ||
rm -r lib | ||
npm pack | ||
- name: Upload end-to-end tests | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ matrix.node-version == '16' && matrix.npm-version == 'default' }} | ||
with: | ||
name: e2e-tests | ||
path: 'tests/e2e/**/*' | ||
|
||
- name: Upload package tarball | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ matrix.node-version == '16' && matrix.npm-version == 'default' }} | ||
with: | ||
name: package | ||
path: '*.tgz' | ||
|
||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
resolver: | ||
- esbuild | ||
- node-commonjs | ||
- node-esm | ||
- node-global | ||
- npm-alias | ||
- rollup | ||
- webpack@4-commonjs | ||
- webpack@4-esm | ||
- webpack@5-commonjs | ||
- webpack@5-esm | ||
node-version: ['12', '14', '16'] | ||
npm-version: [default, latest] | ||
|
||
steps: | ||
- name: Download end-to-end tests | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: e2e-tests | ||
|
||
- name: Download package tarball | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: package | ||
|
||
- name: Build test image | ||
run: | | ||
cd ${{ matrix.resolver }} | ||
cp ../*.tgz . | ||
ls -la | ||
docker build --build-arg NODE_VERSION=${{ matrix.node-version }} --build-arg NPM_VERSION=${{ matrix.npm-version }} --file Dockerfile --tag test-image . | ||
- name: Run test | ||
run: | | ||
cd ${{ matrix.resolver }} | ||
docker run --name test-container test-image > actual.txt | ||
diff expected.txt actual.txt |
This file contains 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.