-
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.
* ci: add some tests * test: format with prettier * ci: run tests on pull-requests and pushes * improve ci flow * ci: fix unit test * Update package.json Co-authored-by: Lukas <[email protected]> * test: disable some type warnings * test: disable some type warnings * fix: improve rollup config * build: remove unused deps Co-authored-by: Lukas <[email protected]>
- Loading branch information
Showing
9 changed files
with
173 additions
and
66 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,135 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
YARN_CACHE_FOLDER: ~/.yarn | ||
|
||
jobs: | ||
unit-tests: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.YARN_CACHE_FOLDER }} | ||
key: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-yarn-${{ env.cache-name }} | ||
${{ runner.OS }}-yarn- | ||
- name: Installing dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Unit test | ||
run: yarn test | ||
|
||
- uses: artiomtr/[email protected] | ||
if: "github.event_name == 'pull_request'" | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
skip-step: all | ||
|
||
typecheck: | ||
name: Typecheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.YARN_CACHE_FOLDER }} | ||
key: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-yarn-${{ env.cache-name }} | ||
${{ runner.OS }}-yarn- | ||
- name: Installing dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Typecheck | ||
run: yarn typecheck | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.YARN_CACHE_FOLDER }} | ||
key: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-yarn-${{ env.cache-name }} | ||
${{ runner.OS }}-yarn- | ||
- name: Installing dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
check-format: | ||
name: Check format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Caching | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.YARN_CACHE_FOLDER }} | ||
key: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-yarn-${{ env.cache-name }} | ||
${{ runner.OS }}-yarn- | ||
- name: Installing dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Check format | ||
run: yarn lint:format |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ dist | |
coverage/ | ||
junit.xml | ||
*.tgz | ||
report.json |
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 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 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,5 +1,3 @@ | ||
{ | ||
"extends": [ | ||
"config:base" | ||
] | ||
"extends": ["config:base"] | ||
} |
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
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 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 |
---|---|---|
|
@@ -1422,11 +1422,6 @@ ansi-regex@^3.0.0: | |
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" | ||
integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= | ||
|
||
ansi-regex@^4.1.0: | ||
version "4.1.0" | ||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" | ||
integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== | ||
|
||
ansi-regex@^5.0.0: | ||
version "5.0.0" | ||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" | ||
|
@@ -2612,15 +2607,7 @@ es-to-primitive@^1.2.1: | |
is-date-object "^1.0.1" | ||
is-symbol "^1.0.2" | ||
|
||
[email protected]: | ||
version "2.6.0" | ||
resolved "https://registry.yarnpkg.com/esbuild-register/-/esbuild-register-2.6.0.tgz#9f19a54c82be751dd87673d6a66d7b9e1cdd8498" | ||
integrity sha512-2u4AtnCXP5nivtIxZryiZOUcEQkOzFS7UhAqibUEmaTAThJ48gDLYTBF/Fsz+5r0hbV1jrFE6PQvPDUrKZNt/Q== | ||
dependencies: | ||
esbuild "^0.12.8" | ||
jsonc-parser "^3.0.0" | ||
|
||
[email protected], esbuild@^0.12.8: | ||
[email protected]: | ||
version "0.12.9" | ||
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.12.9.tgz#bed4e7087c286cd81d975631f77d47feb1660070" | ||
integrity sha512-MWRhAbMOJ9RJygCrt778rz/qNYgA4ZVj6aXnNPxFjs7PmIpb0fuB9Gmg5uWrr6n++XKwwm/RmSz6RR5JL2Ocsw== | ||
|
@@ -4168,16 +4155,6 @@ jest-jasmine2@^26.6.3: | |
pretty-format "^26.6.2" | ||
throat "^5.0.0" | ||
|
||
[email protected]: | ||
version "12.2.0" | ||
resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-12.2.0.tgz#cff7f9516e84f8e30f6bdea04cd84db6b095a376" | ||
integrity sha512-ecGzF3KEQwLbMP5xMO7wqmgmyZlY/5yWDvgE/vFa+/uIT0KsU5nluf0D2fjIlOKB+tb6DiuSSpZuGpsmwbf7Fw== | ||
dependencies: | ||
mkdirp "^1.0.4" | ||
strip-ansi "^5.2.0" | ||
uuid "^8.3.2" | ||
xml "^1.0.1" | ||
|
||
jest-leak-detector@^26.6.2: | ||
version "26.6.2" | ||
resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af" | ||
|
@@ -4521,11 +4498,6 @@ jsonc-eslint-parser@^0.6.2: | |
eslint-visitor-keys "^1.3.0" | ||
espree "^6.0.0 || ^7.2.0" | ||
|
||
jsonc-parser@^3.0.0: | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22" | ||
integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA== | ||
|
||
jsonfile@^4.0.0: | ||
version "4.0.0" | ||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" | ||
|
@@ -6774,13 +6746,6 @@ strip-ansi@^4.0.0: | |
dependencies: | ||
ansi-regex "^3.0.0" | ||
|
||
strip-ansi@^5.2.0: | ||
version "5.2.0" | ||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" | ||
integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== | ||
dependencies: | ||
ansi-regex "^4.1.0" | ||
|
||
strip-ansi@^6.0.0: | ||
version "6.0.0" | ||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" | ||
|
@@ -7289,7 +7254,7 @@ uuid@^3.3.2: | |
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" | ||
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== | ||
|
||
uuid@^8.3.0, uuid@^8.3.2: | ||
uuid@^8.3.0: | ||
version "8.3.2" | ||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" | ||
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== | ||
|
@@ -7507,11 +7472,6 @@ xml-name-validator@^3.0.0: | |
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" | ||
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== | ||
|
||
xml@^1.0.1: | ||
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" | ||
integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= | ||
|
||
xmlchars@^2.2.0: | ||
version "2.2.0" | ||
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" | ||
|