Skip to content

Commit

Permalink
Merge branch 'github-actions' of https://github.com/NYPL/sfr-bookfind…
Browse files Browse the repository at this point in the history
…er-front-end into github-actions
  • Loading branch information
mwbenowitz committed Mar 9, 2021
2 parents 699094f + e02ced1 commit 872100c
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 89 deletions.
122 changes: 122 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# For all PRs, this workflow will
# - Install deps
# - Lint
# - Typecheck
# - Test
name: CI

on:
# will run on all PRs that are opened or updated (synchronized)
pull_request:
types: [opened, synchronize, reopened]

jobs:
# changelog must be edited for every PR
changelog:
name: Updates Changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dangoslen/[email protected]
with:
changeLogPath: "CHANGELOG.md"
skipLabel: "no-changelog"

lint:
name: Lint
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v2
- id: nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)

- name: Use Node Version from nvmrc
uses: actions/setup-node@v1
with: { node-version: "${{ steps.nvmrc.outputs.NODE_VERSION }}" }

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm install

- name: Lint
run: npm run lint

typecheck:
name: Typecheck
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v2
- id: nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)

- name: Use Node Version from nvmrc
uses: actions/setup-node@v1
with: { node-version: "${{ steps.nvmrc.outputs.NODE_VERSION }}" }

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm install

- name: Typecheck
run: node_modules/typescript/bin/tsc --noEmit

test:
name: Test & Coverage
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v2
- id: nvmrc
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)

- name: Use Node Version from nvmrc
uses: actions/setup-node@v1
with: { node-version: "${{ steps.nvmrc.outputs.NODE_VERSION }}" }

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: npm install

- name: Test
run: npm run test
3 changes: 0 additions & 3 deletions .nycrc

This file was deleted.

4 changes: 0 additions & 4 deletions .storybook/addons.js

This file was deleted.

14 changes: 0 additions & 14 deletions .storybook/config.js

This file was deleted.

18 changes: 0 additions & 18 deletions .storybook/webpack.config.js

This file was deleted.

39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

Binary file removed AWSCLIV2.pkg
Binary file not shown.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# CHANGE LOG
## PRERELEASE
- Refactors app to use NextJS, NYPL Design System, Typescript

## [0.9.3]
- Updated dgx-global-footer to 0.5.7.
- Adds the new urlType prop to the Footer component set to "absolute"
Expand Down
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
"private": true,
"scripts": {
"dev": "next dev",
"eb-dev": "next dev -p $PORT",
"build": "next build",
"start": "next start",
"eb-start": "NODE_ENV=development next build && node ./server.js",
"test": "jest",
"test:watch": "jest --watch",
"lint": "eslint --ignore-path .gitignore '*/**/*.{ts,tsx}'",
Expand All @@ -24,7 +22,10 @@
"react": "^16.14.0",
"react-dom": "^16.14.0",
"redux": "4.0.1",
"sass": "^1.29.0"
"sass": "^1.29.0",
"typescript": "^4.1.3",
"@types/node": "^14.14.33",
"@types/react": "^16.9.5"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.11.9",
Expand All @@ -33,7 +34,6 @@
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/jest": "^26.0.20",
"@types/mocha": "^8.2.0",
"@types/react": "^16.9.5",
"@types/testing-library__jest-dom": "^5.9.5",
"@typescript-eslint/eslint-plugin": "^4.10.0",
"@typescript-eslint/parser": "^4.10.0",
Expand All @@ -52,7 +52,6 @@
"eslint-plugin-react-hooks": "^4.2.0",
"jest": "^26.6.3",
"next-page-tester": "^0.23.0",
"prettier": "^2.2.1",
"typescript": "^4.1.3"
"prettier": "^2.2.1"
}
}

0 comments on commit 872100c

Please sign in to comment.