2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-22 13:10:34 +03:00
Files
vue-meta/.circleci/config.yml
T
2019-03-23 16:00:30 +01:00

161 lines
3.4 KiB
YAML
Executable File

version: 2
defaults: &defaults
working_directory: ~/project
docker:
- image: circleci/node:latest
environment:
NODE_ENV: test
e2e_browsers: &e2e_browsers
working_directory: ~/project
docker:
- image: circleci/node:latest-browsers
environment:
NODE_ENV: test
jobs:
setup:
<<: *defaults
steps:
# Checkout repository
- checkout
# Restore cache
- restore_cache:
key: yarn-{{ checksum "yarn.lock" }}
# Install dependencies
- run:
name: Install Dependencies
command: NODE_ENV=dev yarn
# Keep cache
- save_cache:
key: yarn-{{ checksum "yarn.lock" }}
paths:
- "node_modules"
# Persist workspace
- persist_to_workspace:
root: ~/project
paths:
- node_modules
lint:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: Lint
command: yarn lint
audit:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: Security Audit
command: yarn audit
test-unit:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: Unit Tests
command: yarn test:unit --coverage && yarn coverage
test-e2e-ssr:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: E2E Tests
command: yarn test:e2e-ssr
test-e2e-firefox:
<<: *e2e_browsers
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: E2E Tests
command: yarn test:e2e-browser
environment:
BROWSER_STRING: firefox
test-e2e-chrome:
<<: *e2e_browsers
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: E2E Tests
command: yarn test:e2e-browser
environment:
BROWSER_STRING: chrome
test-e2e-ie:
<<: *e2e_browsers
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: E2E Tests
command: yarn test:e2e-browser
environment:
BROWSER_STRING: browserstack/local/ie:9
test-e2e-edge:
<<: *e2e_browsers
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: E2E Tests
command: yarn test:e2e-browser
environment:
BROWSER_STRING: browserstack/local/edge:15
test-e2e-safari:
<<: *e2e_browsers
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: E2E Tests
command: yarn test:e2e-browser
environment:
BROWSER_STRING: browserstack/local/os x=snow leopard/safari:5.1
workflows:
version: 2
commit:
jobs:
- setup
- lint: { requires: [setup] }
- audit: { requires: [setup] }
- test-unit: { requires: [lint] }
- test-e2e-ssr: { requires: [lint] }
- test-e2e-firefox: { requires: [test-e2e-ssr] }
- test-e2e-chrome: { requires: [test-e2e-ssr] }
- test-e2e-ie: { requires: [test-e2e-ssr] }
- test-e2e-edge: { requires: [test-e2e-ssr] }
- test-e2e-safari: { requires: [test-e2e-ssr] }