Skip to content

Commit

Permalink
ci: Migrate to Travis CI. (#239)
Browse files Browse the repository at this point in the history
* Start migrating to travis.

* Add storybook.

* Happo and more fixes.

* Update deps and scripts.

* Fix build.

* Include types for scripts.

* Fix types.

* Add logging.

* Delete old workflows.

* Update deps.

* More fixes.

* PR stuff.

* Fix types.

* Move publish to script.

* Blah.

* Convert scripts to TS.

* Add gh-pages dep locally.

* Final polish.

* Remove token.
  • Loading branch information
milesj authored Nov 14, 2019
1 parent 88acedd commit 2a62442
Show file tree
Hide file tree
Showing 32 changed files with 1,282 additions and 1,521 deletions.
8 changes: 0 additions & 8 deletions .github/actions/setup/action.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/actions/setup/index.js

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/publish.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/require.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/test.yml

This file was deleted.

41 changes: 29 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,24 @@ install:
- yarn install --frozen-lockfile --ignore-engines
before_script:
- yarn run build
script:
- echo "Skip"
matrix:
fast_finish: true
jobs:
fast_finish: true
include:
- stage: Tests
name: Happo
script: yarn run happo:ci:travis
- stage: Checks
name: Pull Request
if: type = pull_request
script: yarn run check:pr
node_js: '12'
- name: Build Sizes
if: type = pull_request
- name: Test @ 10
script: yarn run check:build
node_js: '12'
- name: Happo
if: type = pull_request
script: yarn run check:happo
node_js: '12'
- stage: Tests
name: Test @ 10
script: yarn run jest:coverage -w 4
node_js: '10'
- name: Test @ 12
Expand All @@ -30,21 +36,32 @@ jobs:
- name: Lint @ 12
script: yarn run lint:errors
node_js: '12'
- stage: Release Packages
- stage: Release
name: Storybook
script: yarn run build:storybook
node_js: '12'
if: branch = master
deploy:
provider: script
script: yarn run release:storybook
skip_cleanup: true
on:
branch: master
- name: NPM
script: yarn run build:sizes
node_js: '12'
if: branch = master
before_deploy:
- git config --global user.name ${GITHUB_USER}
- git config --global user.email ${GITHUB_EMAIL}
- git remote set-url origin "https://${GH_TOKEN}@github.com/airbnb/lunar.git" > /dev/null
2>&1
- git remote set-url origin "https://${GITHUB_TOKEN}@github.com/airbnb/lunar.git" >
/dev/null 2>&1
- git checkout master
- git add packages/sizes.json && git commit -m "Update build size stats."
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
deploy:
provider: script
script: yarn run deploy:npm
script: yarn run release
skip_cleanup: true
on:
branch: master
Expand Down
10 changes: 9 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
"useWorkspaces": true,
"command": {
"publish": {
"ignoreChanges": ["*.md", "story.tsx", "*.story.tsx", "*.test.ts", "*.test.tsx", "*.snap", "*.d.ts"],
"ignoreChanges": [
"*.md",
"story.tsx",
"*.story.tsx",
"*.test.ts",
"*.test.tsx",
"*.snap",
"*.d.ts"
],
"message": "Release [ci skip]"
}
},
Expand Down
74 changes: 38 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,29 @@
"prepare": "nimbus create-config --silent",
"babel": "nimbus babel --workspaces=* && nimbus babel --esm --workspaces=*",
"build": "yarn run type && yarn run babel && yarn run clean:story",
"build:sizes": "yarn run ts ./scripts/computeBuildSizes.ts",
"build:sizes": "yarn run ts ./scripts/tasks/computeBuildSizes.ts",
"build:storybook": "build-storybook",
"check:build": "yarn run ts ./scripts/checks/compareBuildSizes.ts",
"check:happo": "happo-ci-travis",
"check:pr": "nimbus run-script pull-request-checks",
"clean": "rimraf './packages/*/{lib,esm}'",
"clean:hard": "yarn run clean && rimraf './packages/**/*.tsbuildinfo'",
"clean:story": "rimraf './packages/*/{lib,esm}/**/*story.*'",
"deploy:npm": "yarn run release:version && yarn run release:publish",
"gen:icon": "node ./scripts/generateIcon.js",
"gen:icon": "yarn run ts ./scripts/tasks/generateIcon.ts",
"happo": "happo run",
"happo:ci": "happo-ci",
"happo:ci:travis": "happo-ci-travis",
"jest:coverage": "yarn run jest --coverage",
"jest": "NODE_ENV=test TZ=UTC nimbus jest",
"lint:errors": "yarn run lint --quiet",
"lint": "nimbus eslint",
"posttest": "yarn run lint",
"pretest": "yarn run type",
"prettier": "nimbus prettier",
"release": "yarn run build && lerna publish",
"release:publish": "lerna publish from-git --yes",
"release:version": "lerna version --yes --conventional-commits --changelog-preset conventional-changelog-beemo --create-release github --push",
"sg": "NODE_ENV=development yarn run storybook",
"release": "nimbus run-script auto-release",
"release:storybook": "yarn run ts ./scripts/tasks/publishStorybook.ts",
"sg": "NODE_ENV=development start-storybook -p 6006",
"test": "yarn run jest:coverage",
"ts": "ts-node --project ./tsconfig.node.json",
"type": "nimbus typescript --build --reference-workspaces",
"storybook": "start-storybook -p 6006",
"storybook:build": "build-storybook"
"type": "nimbus typescript --build --reference-workspaces"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -71,60 +69,64 @@
"./packages/*"
],
"dependencies": {
"@storybook/addon-a11y": "^5.2.5",
"@storybook/addon-actions": "^5.2.5",
"@storybook/addon-a11y": "^5.2.6",
"@storybook/addon-actions": "^5.2.6",
"@storybook/addon-console": "^1.2.1",
"@storybook/addon-contexts": "^5.2.5",
"@storybook/addon-links": "^5.2.5",
"@storybook/addon-viewport": "^5.2.5",
"@storybook/addons": "^5.2.5",
"@storybook/react": "^5.2.5",
"@storybook/addon-contexts": "^5.2.6",
"@storybook/addon-links": "^5.2.6",
"@storybook/addon-viewport": "^5.2.6",
"@storybook/addons": "^5.2.6",
"@storybook/react": "^5.2.6",
"markdown-to-jsx": "^6.10.3",
"react-element-to-jsx-string": "^14.1.0"
},
"devDependencies": {
"@airbnb/config-babel": "^2.0.2",
"@airbnb/config-danger": "^2.0.2",
"@airbnb/config-eslint": "^2.1.0",
"@airbnb/config-jest": "^2.0.2",
"@airbnb/config-prettier": "^2.0.1",
"@airbnb/config-typescript": "^2.0.1",
"@airbnb/nimbus": "^2.0.4",
"@airbnb/config-babel": "^2.1.2",
"@airbnb/config-eslint": "^2.2.2",
"@airbnb/config-jest": "^2.1.2",
"@airbnb/config-prettier": "^2.0.3",
"@airbnb/config-typescript": "^2.1.1",
"@airbnb/nimbus": "^2.1.2",
"@types/airbnb-prop-types": "^2.13.1",
"@types/enzyme": "^3.10.3",
"@types/filesize": "^5.0.0",
"@types/gh-pages": "^2.0.1",
"@types/google.analytics": "0.0.40",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/jest": "^24.0.21",
"@types/jest": "^24.0.23",
"@types/jscodeshift": "^0.6.3",
"@types/lodash": "^4.14.144",
"@types/lodash": "^4.14.146",
"@types/luxon": "^1.15.1",
"@types/node-fetch": "^2.5.3",
"@types/prop-types": "^15.7.3",
"@types/react": "^16.9.11",
"@types/react-dom": "^16.9.3",
"@types/react-dom": "^16.9.4",
"@types/shallowequal": "^1.1.1",
"@types/storybook__react": "^4.0.2",
"@types/svgo": "^1.3.0",
"@types/uuid": "^3.4.6",
"babel-loader": "^8.0.6",
"emojibase-test-utils": "^4.1.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"enzyme-to-json": "^3.4.3",
"eslint-plugin-rut": "^0.1.7",
"eslint-plugin-rut": "^0.1.9",
"fast-glob": "^3.1.0",
"filesize": "^6.0.1",
"full-icu": "^1.3.0",
"gh-pages": "^2.1.1",
"happo-plugin-storybook": "^2.4.0",
"happo.io": "^3.27.0",
"jest-rut": "^0.7.1",
"lerna": "^3.18.3",
"happo.io": "^4.0.1",
"jest-rut": "^0.8.1",
"lerna": "^3.18.4",
"moment": "^2.24.0",
"prettier": "^1.18.1",
"react": "^16.11.0",
"react-docgen-typescript-loader": "^3.3.0",
"react-dom": "^16.11.0",
"rimraf": "^3.0.0",
"rut": "^0.8.2",
"rut-dom": "^0.1.1",
"svgo": "^1.3.2",
"ts-node": "^8.4.1",
"ts-node": "^8.5.0",
"url-loader": "^2.2.0"
},
"nimbus": {
Expand Down
6 changes: 5 additions & 1 deletion packages/apollo/src/updaters/removeFromList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export default function removeFromList<Result, Vars = {}>(
}
}

set(nextResult, listPath, list.filter(item => item[idName] !== id));
set(
nextResult,
listPath,
list.filter(item => item[idName] !== id),
);

cache.writeQuery({
...query,
Expand Down
Loading

0 comments on commit 2a62442

Please sign in to comment.