2017-07-11 08:01:23 -07:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
working_directory: ~/mattermost-desktop
|
|
|
|
docker:
|
|
|
|
- image: electronuserland/builder:wine-mono
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
|
|
|
|
- restore_cache:
|
|
|
|
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "src/yarn.lock" }}
|
2018-04-10 05:21:40 -07:00
|
|
|
- run: apt-get update && apt-get -y install --no-install-recommends jq icnsutils graphicsmagick tzdata
|
2017-07-11 08:01:23 -07:00
|
|
|
- run: yarn
|
|
|
|
- run: npm run build
|
|
|
|
- run: npm run package:windows
|
|
|
|
- run: npm run package:mac
|
|
|
|
- run: npm run package:linux
|
|
|
|
- run: mkdir -p /tmp/artifacts
|
|
|
|
- run: sh -x ./scripts/cp_artifacts.sh release /tmp/artifacts
|
2018-08-01 07:06:13 -07:00
|
|
|
- run: npm run lint:js
|
2017-07-11 08:01:23 -07:00
|
|
|
- save_cache:
|
|
|
|
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
|
|
|
|
paths:
|
|
|
|
- "node_modules"
|
|
|
|
- "~/.cache/electron"
|
|
|
|
- "~/.cache/electron-builder"
|
|
|
|
- save_cache:
|
|
|
|
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "src/yarn.lock" }}
|
|
|
|
paths:
|
|
|
|
- "src/node_modules"
|
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/artifacts/
|
|
|
|
destination: packages
|
2018-04-12 06:57:09 -07:00
|
|
|
- run: ./node_modules/.bin/build-storybook -c src/.storybook -o storybook
|
|
|
|
- store_artifacts:
|
|
|
|
path: storybook/
|
|
|
|
destination: storybook
|
2017-07-11 08:01:23 -07:00
|
|
|
|
|
|
|
test:
|
|
|
|
working_directory: ~/mattermost-desktop
|
|
|
|
docker:
|
|
|
|
- image: electronuserland/builder:wine-chrome
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-03-20 07:04:29 -07:00
|
|
|
- run: apt-get update && apt-get -y install --no-install-recommends libgconf-2-4
|
2017-07-11 08:01:23 -07:00
|
|
|
- run: yarn
|
|
|
|
# https://github.com/SeleniumHQ/docker-selenium/issues/222#issuecomment-221307583
|
|
|
|
- run: DBUS_SESSION_BUS_ADDRESS=/dev/null xvfb-run npm test
|
|
|
|
- run: mkdir -p /tmp/test-results
|
|
|
|
- run: cp test-results.xml /tmp/test-results/
|
|
|
|
- store_test_results:
|
|
|
|
path: /tmp/test-results
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build_and_test:
|
|
|
|
jobs:
|
|
|
|
- build
|
|
|
|
- test
|