mattermost-desktop/.circleci/config.yml

62 lines
2.1 KiB
YAML
Raw Normal View History

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:
2019-01-07 06:22:35 -08:00
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}
2017-07-11 08:01:23 -07:00
- restore_cache:
2019-01-07 06:22:35 -08:00
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "src/package-lock.json" }}
- run: apt-get update && apt-get -y install --no-install-recommends jq icnsutils graphicsmagick tzdata
2019-01-07 06:22:35 -08:00
- run: npm install
2017-07-11 08:01:23 -07:00
- run: npm run build
- run: npm run package:windows
2018-12-05 04:34:50 -08:00
- run: jq '.mac.target=["zip"]' electron-builder.json > /tmp/electron-builder.json && cp /tmp/electron-builder.json .
2017-07-11 08:01:23 -07:00
- 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
- run: npm run lint:js
2017-07-11 08:01:23 -07:00
- save_cache:
2019-01-07 06:22:35 -08:00
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}
2017-07-11 08:01:23 -07:00
paths:
- "node_modules"
- "~/.cache/electron"
- "~/.cache/electron-builder"
- save_cache:
2019-01-07 06:22:35 -08:00
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "src/package-lock.json" }}
2017-07-11 08:01:23 -07:00
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
- run: apt-get update && apt-get -y install --no-install-recommends libgconf-2-4
2019-01-07 06:22:35 -08:00
- run: npm install
2017-07-11 08:01:23 -07:00
# 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