Skip to content

Commit

Permalink
Update our GitHub Action for tests and coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
kmjennison committed Jan 8, 2021
1 parent e37c582 commit 4514276
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 94 deletions.
5 changes: 0 additions & 5 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ NEXT_PUBLIC_ADS_ENABLED=false
NEXT_PUBLIC_ADS_USE_MOCK_ADS=true


########## CodeCov ##########

# CODECOV_TOKEN=secret-value


########## Developer/Internal Features ##########

NEXT_PUBLIC_DEVELOPMENT_SHOW_DEMO_PAGES=true
Expand Down
5 changes: 0 additions & 5 deletions .env.local.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
# Copy this file to .env.local, which is not in
# source control, and set the secrets.

########## CodeCov ##########

# CODECOV_TOKEN=secret-value


########## Firebase ##########

# FIREBASE_PRIVATE_KEY=secret-value
Expand Down
6 changes: 0 additions & 6 deletions .env.preview.info
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
NEXT_PUBLIC_ADS_ENABLED=true
NEXT_PUBLIC_ADS_USE_MOCK_ADS=false


########## CodeCov ##########

# CODECOV_TOKEN=secret-value


########## Developer/Internal Features ##########

NEXT_PUBLIC_DEVELOPMENT_SHOW_DEMO_PAGES=true
Expand Down
6 changes: 0 additions & 6 deletions .env.production.info
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
NEXT_PUBLIC_ADS_ENABLED=true
NEXT_PUBLIC_ADS_USE_MOCK_ADS=false


########## CodeCov ##########

# CODECOV_TOKEN=secret-value


########## Developer/Internal Features ##########

NEXT_PUBLIC_DEVELOPMENT_SHOW_DEMO_PAGES=false
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/nodejs.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# For more information see:
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Run tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install dependencies
run: yarn install
- name: Run tests
run: yarn test # generates coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
- name: Build
run: yarn run build # ensure build does not error
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "NODE_ENV=test yarn run test && NODE_ENV=production yarn run relay && next build",
"start": "NODE_ENV=production next start",
"test": "yarn run lint && yarn run relay && jest",
"test:coverage": "yarn run test --coverage && codecov",
"test:coverage": "yarn run test --coverage",
"format": "prettier \"**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
"format:fix": "yarn run format --write",
"lint": "eslint \"**/*.{js,jsx}\" --ignore-pattern \"next.config.*js\"",
Expand Down Expand Up @@ -45,7 +45,6 @@
"babel-jest": "^26.6.3",
"babel-plugin-module-resolver": "^4.0.0",
"babel-plugin-relay": "^10.0.0",
"codecov": "^3.7.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "^7.8.1",
Expand Down
49 changes: 2 additions & 47 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3166,11 +3166,6 @@ [email protected]:
loader-utils "^2.0.0"
regex-parser "^2.2.11"

agent-base@5:
version "5.1.1"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c"
integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==

agent-base@6:
version "6.0.0"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.0.tgz#5d0101f19bbfaed39980b22ae866de153b93f09a"
Expand Down Expand Up @@ -3367,11 +3362,6 @@ argparse@^1.0.7:
dependencies:
sprintf-js "~1.0.2"

[email protected]:
version "0.0.2"
resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab"
integrity sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=

aria-query@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b"
Expand Down Expand Up @@ -4338,17 +4328,6 @@ code-point-at@^1.0.0:
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=

codecov@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.7.2.tgz#998e68c8c1ef4b55cfcf11cd456866d35e13d693"
integrity sha512-fmCjAkTese29DUX3GMIi4EaKGflHa4K51EoMc29g8fBHawdk/+KEq5CWOeXLdd9+AT7o1wO4DIpp/Z1KCqCz1g==
dependencies:
argv "0.0.2"
ignore-walk "3.0.3"
js-yaml "3.13.1"
teeny-request "6.0.1"
urlgrey "0.4.4"

collect-v8-coverage@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59"
Expand Down Expand Up @@ -6991,14 +6970,6 @@ [email protected], https-proxy-agent@^5.0.0:
agent-base "6"
debug "4"

https-proxy-agent@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b"
integrity sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==
dependencies:
agent-base "5"
debug "4"

human-signals@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
Expand Down Expand Up @@ -7050,7 +7021,7 @@ iferr@^0.1.5:
resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"
integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE=

ignore-walk@3.0.3, ignore-walk@^3.0.1:
ignore-walk@^3.0.1:
version "3.0.3"
resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37"
integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==
Expand Down Expand Up @@ -7952,7 +7923,7 @@ jest@^26.6.3:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==

js-yaml@3.13.1, js-yaml@^3.13.1:
js-yaml@^3.13.1:
version "3.13.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
Expand Down Expand Up @@ -11762,17 +11733,6 @@ tar@^4:
safe-buffer "^5.1.2"
yallist "^3.0.3"

[email protected]:
version "6.0.1"
resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-6.0.1.tgz#9b1f512cef152945827ba7e34f62523a4ce2c5b0"
integrity sha512-TAK0c9a00ELOqLrZ49cFxvPVogMUFaWY8dUsQc/0CuQPGF+BOxOQzXfE413BAk2kLomwNplvdtMpeaeGWmoc2g==
dependencies:
http-proxy-agent "^4.0.0"
https-proxy-agent "^4.0.0"
node-fetch "^2.2.0"
stream-events "^1.0.5"
uuid "^3.3.2"

teeny-request@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/teeny-request/-/teeny-request-7.0.0.tgz#0e5c090bd9102ed559ffc8c9ddb00fbe1256db30"
Expand Down Expand Up @@ -12315,11 +12275,6 @@ url@^0.11.0:
punycode "1.3.2"
querystring "0.2.0"

[email protected]:
version "0.4.4"
resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f"
integrity sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=

[email protected]:
version "1.5.1"
resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.1.tgz#73501107f02fad84c6dd57965beb0b75c68c42d1"
Expand Down

0 comments on commit 4514276

Please sign in to comment.