-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
8,474 additions
and
34,609 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,114 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 17.x] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Use Node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Cache Yarn | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-${{ matrix.node-version }}- | ||
${{ runner.os }}-yarn- | ||
${{ runner.os }}- | ||
- name: Install dependencies | ||
run: yarn install --ignore-engines && git checkout yarn.lock | ||
|
||
test-and-coverage: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 17.x] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Use Node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Cache Yarn | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-yarn-node-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-node-${{ matrix.node-version }}- | ||
${{ runner.os }}-yarn-node- | ||
${{ runner.os }}-yarn- | ||
${{ runner.os }}- | ||
- name: Install dependencies | ||
run: yarn install --ignore-engines && git checkout yarn.lock | ||
- name: Run tests plus coverage | ||
run: yarn coverage | ||
- name: Track coverage | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
flag-name: run-node-${{ matrix.node-version }} | ||
parallel: true | ||
|
||
coveralls-finished: | ||
needs: test-and-coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
parallel-finished: true | ||
|
||
build-plus-sizecheck: | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 17.x] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Use Node ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Cache Yarn | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-yarn-node-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-node-${{ matrix.node-version }}- | ||
${{ runner.os }}-yarn-node- | ||
${{ runner.os }}-yarn- | ||
${{ runner.os }}- | ||
- name: Install dependencies | ||
run: yarn install --ignore-engines && git checkout yarn.lock | ||
- name: Build package | ||
run: yarn build | ||
- name: Check bundle-size | ||
env: | ||
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} | ||
run: yarn bundlewatch |
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,33 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [created] | ||
pull_request: # to be removed | ||
branches: [ main ] | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Use Node 17.x | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 17.x | ||
- name: Install fresh dependencies | ||
run: yarn install --ignore-engines --frozen-lockfile | ||
- name: Run tests | ||
run: yarn testonly | ||
- name: Build bundle | ||
run: yarn build | ||
- name: Cleanup minified | ||
run: yarn cleanupminified | ||
- name: Copy additional 'dist' files | ||
run: yarn copydistfiles | ||
- name: Publish package | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
run: cd dist && npm publish --dry-run |
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.