-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- use rollup - use vitest - build on node v20 - package test
- Loading branch information
Showing
16 changed files
with
1,532 additions
and
5,642 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,132 @@ | ||
name: ci | ||
on: [push] | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Resolve caching | ||
id: cache | ||
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }} | ||
run: echo "npm_cache=npm" >> $GITHUB_STATE | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: ${{ env.npm_cache }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
test-unit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Resolve caching | ||
id: cache | ||
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }} | ||
run: echo "npm_cache=npm" >> $GITHUB_STATE | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: ${{ env.npm_cache }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Test | ||
run: npm run test:unit | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Resolve caching | ||
id: cache | ||
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }} | ||
run: echo "npm_cache=npm" >> $GITHUB_STATE | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: ${{ env.npm_cache }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: yarn run build | ||
|
||
- name: Upload build files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
retention-days: 1 | ||
path: | ||
dist*/ | ||
|
||
test-package: | ||
name: Test package on node ${{ matrix.node }} / ${{ matrix.os }} | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ['20', '18', '16', '14'] | ||
os: [ubuntu-latest, windows-latest] | ||
exclude: | ||
- os: windows-latest | ||
node: 20 | ||
- os: windows-latest | ||
node: 18 | ||
- os: windows-latest | ||
node: 16 | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install vitest | ||
run: npm install vitest | ||
|
||
- name: Download build files | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
|
||
- name: Setup local npm registry | ||
run: ./scripts/setup-registry.sh | ||
|
||
- name: Install test package dependencies | ||
run: npm install | ||
working-directory: test/package | ||
|
||
- name: Test package | ||
run: npm run test:package | ||
|
||
tests: | ||
needs: | ||
- lint | ||
- test-unit | ||
- test-package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: exit 0 |
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,5 @@ | ||
rollup.config.mjs | ||
verdaccio.yml | ||
tsconfig.json | ||
scripts/**/* | ||
test/**/* |
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 |
---|---|---|
@@ -1 +1 @@ | ||
v14 | ||
v20 |
Oops, something went wrong.