Skip to content

Commit 6ba5e33

Browse files
authored
Use GitHub Actions to run tests and publish (#186)
* Use GitHub Actions to run tests and publish * Use Codecov action * Only run actions when targeting master * Remove codecov dependency * Remove circleci * Add publish workflow
1 parent 1ea1a9c commit 6ba5e33

File tree

5 files changed

+48
-135
lines changed

5 files changed

+48
-135
lines changed

.circleci/config.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/publish.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: '16.x'
15+
registry-url: 'https://registry.npmjs.org'
16+
- run: npm publish
17+
env:
18+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}

.github/workflows/tests.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
name: Tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 2
17+
- uses: actions/setup-node@v3
18+
timeout-minutes: 5 # See https://github.com/actions/cache/issues/810
19+
with:
20+
cache: 'yarn'
21+
22+
- run: yarn install --network-timeout 1000000 --frozen-lockfile
23+
- run: yarn test
24+
- run: yarn run coverage
25+
26+
- name: Upload Coverage
27+
uses: codecov/codecov-action@v3

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"test": "yarn run test-lint && yarn run test-integration",
88
"test-lint": "zeit-eslint --ext .jsx,.js .",
99
"test-integration": "nyc --reporter=html --reporter=text ava test/integration.js",
10-
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
10+
"coverage": "nyc report --reporter=text-lcov > coverage.lcov",
1111
"lint-staged": "git diff --diff-filter=ACMRT --cached --name-only '*.js' '*.jsx' | xargs zeit-eslint",
1212
"build-views": "dottojs -s ./src -d ./src",
1313
"prepublish": "yarn run build-views"
@@ -30,7 +30,6 @@
3030
"@zeit/eslint-config-node": "0.2.13",
3131
"@zeit/git-hooks": "0.1.4",
3232
"ava": "2.2.0",
33-
"codecov": "3.7.1",
3433
"commander": "2.15.1",
3534
"dot": "1.1.3",
3635
"eslint": "6.1.0",

yarn.lock

Lines changed: 2 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,6 @@
345345
dependencies:
346346
defer-to-connect "^1.0.1"
347347

348-
"@tootallnate/once@1":
349-
version "1.1.2"
350-
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
351-
integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==
352-
353348
"@types/color-name@^1.1.1":
354349
version "1.1.1"
355350
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
@@ -409,18 +404,6 @@ acorn@^7.1.1:
409404
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.2.0.tgz#17ea7e40d7c8640ff54a694c889c26f31704effe"
410405
integrity sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==
411406

412-
agent-base@5:
413-
version "5.1.1"
414-
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c"
415-
integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==
416-
417-
agent-base@6:
418-
version "6.0.0"
419-
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a"
420-
integrity sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==
421-
dependencies:
422-
debug "4"
423-
424407
ajv@^5.1.0:
425408
version "5.5.2"
426409
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
@@ -527,11 +510,6 @@ argparse@^1.0.7:
527510
dependencies:
528511
sprintf-js "~1.0.2"
529512

530-
argv@0.0.2:
531-
version "0.0.2"
532-
resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab"
533-
integrity sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=
534-
535513
arr-flatten@^1.1.0:
536514
version "1.1.0"
537515
resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
@@ -979,17 +957,6 @@ code-excerpt@^2.1.1:
979957
dependencies:
980958
convert-to-spaces "^1.0.1"
981959

982-
codecov@3.7.1:
983-
version "3.7.1"
984-
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.7.1.tgz#434cb8d55f18ef01672e5739d3d266696bebc202"
985-
integrity sha512-JHWxyPTkMLLJn9SmKJnwAnvY09kg2Os2+Ux+GG7LwZ9g8gzDDISpIN5wAsH1UBaafA/yGcd3KofMaorE8qd6Lw==
986-
dependencies:
987-
argv "0.0.2"
988-
ignore-walk "3.0.3"
989-
js-yaml "3.13.1"
990-
teeny-request "6.0.1"
991-
urlgrey "0.4.4"
992-
993960
color-convert@^1.9.0:
994961
version "1.9.3"
995962
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
@@ -1167,7 +1134,7 @@ date-time@^2.1.0:
11671134
dependencies:
11681135
time-zone "^1.0.0"
11691136

1170-
debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
1137+
debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
11711138
version "4.1.1"
11721139
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
11731140
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
@@ -1933,15 +1900,6 @@ http-errors@1.6.2:
19331900
setprototypeof "1.0.3"
19341901
statuses ">= 1.3.1 < 2"
19351902

1936-
http-proxy-agent@^4.0.0:
1937-
version "4.0.1"
1938-
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a"
1939-
integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==
1940-
dependencies:
1941-
"@tootallnate/once" "1"
1942-
agent-base "6"
1943-
debug "4"
1944-
19451903
http-signature@~1.2.0:
19461904
version "1.2.0"
19471905
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
@@ -1951,14 +1909,6 @@ http-signature@~1.2.0:
19511909
jsprim "^1.2.2"
19521910
sshpk "^1.7.0"
19531911

1954-
https-proxy-agent@^4.0.0:
1955-
version "4.0.0"
1956-
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b"
1957-
integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==
1958-
dependencies:
1959-
agent-base "5"
1960-
debug "4"
1961-
19621912
iconv-lite@0.4.19:
19631913
version "0.4.19"
19641914
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
@@ -1976,13 +1926,6 @@ ignore-by-default@^1.0.0:
19761926
resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
19771927
integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk=
19781928

1979-
ignore-walk@3.0.3:
1980-
version "3.0.3"
1981-
resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37"
1982-
integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==
1983-
dependencies:
1984-
minimatch "^3.0.4"
1985-
19861929
ignore@^4.0.6:
19871930
version "4.0.6"
19881931
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
@@ -2334,14 +2277,6 @@ js-tokens@^4.0.0:
23342277
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
23352278
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
23362279

2337-
js-yaml@3.13.1:
2338-
version "3.13.1"
2339-
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
2340-
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
2341-
dependencies:
2342-
argparse "^1.0.7"
2343-
esprima "^4.0.0"
2344-
23452280
js-yaml@^3.10.0, js-yaml@^3.13.1:
23462281
version "3.14.0"
23472282
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
@@ -2751,7 +2686,7 @@ nice-try@^1.0.4:
27512686
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
27522687
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
27532688

2754-
node-fetch@2.6.1, node-fetch@^2.2.0:
2689+
node-fetch@2.6.1:
27552690
version "2.6.1"
27562691
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
27572692
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
@@ -3630,13 +3565,6 @@ stack-utils@^1.0.2:
36303565
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
36313566
integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
36323567

3633-
stream-events@^1.0.5:
3634-
version "1.0.5"
3635-
resolved "https://registry.yarnpkg.com/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5"
3636-
integrity sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==
3637-
dependencies:
3638-
stubs "^3.0.0"
3639-
36403568
string-width@^2.1.0, string-width@^2.1.1:
36413569
version "2.1.1"
36423570
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
@@ -3750,11 +3678,6 @@ strip-json-comments@~2.0.1:
37503678
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
37513679
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
37523680

3753-
stubs@^3.0.0:
3754-
version "3.0.0"
3755-
resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b"
3756-
integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls=
3757-
37583681
supertap@^1.0.0:
37593682
version "1.0.0"
37603683
resolved "https://registry.yarnpkg.com/supertap/-/supertap-1.0.0.tgz#bd9751c7fafd68c68cf8222a29892206a119fa9e"
@@ -3802,17 +3725,6 @@ table@^5.2.3:
38023725
slice-ansi "^2.1.0"
38033726
string-width "^3.0.0"
38043727

3805-
teeny-request@6.0.1:
3806-
version "6.0.1"
3807-
resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-6.0.1.tgz#9b1f512cef152945827ba7e34f62523a4ce2c5b0"
3808-
integrity sha512-TAK0c9a00ELOqLrZ49cFxvPVogMUFaWY8dUsQc/0CuQPGF+BOxOQzXfE413BAk2kLomwNplvdtMpeaeGWmoc2g==
3809-
dependencies:
3810-
http-proxy-agent "^4.0.0"
3811-
https-proxy-agent "^4.0.0"
3812-
node-fetch "^2.2.0"
3813-
stream-events "^1.0.5"
3814-
uuid "^3.3.2"
3815-
38163728
term-size@^1.2.0:
38173729
version "1.2.0"
38183730
resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69"
@@ -4028,11 +3940,6 @@ url-parse-lax@^3.0.0:
40283940
dependencies:
40293941
prepend-http "^2.0.0"
40303942

4031-
urlgrey@0.4.4:
4032-
version "0.4.4"
4033-
resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f"
4034-
integrity sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=
4035-
40363943
uuid@^3.1.0, uuid@^3.3.2:
40373944
version "3.4.0"
40383945
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"

0 commit comments

Comments
 (0)