Skip to content

Commit

Permalink
Deletes unused folders and adds CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Crystal Ngai committed Mar 9, 2021
1 parent 849d0de commit e02ced1
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 77 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
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.

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
2 changes: 0 additions & 2 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 Down

0 comments on commit e02ced1

Please sign in to comment.