mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-06 03:02:25 +03:00
130 lines
3.1 KiB
YAML
Executable File
130 lines
3.1 KiB
YAML
Executable File
version: 2.1
|
|
|
|
executors:
|
|
node:
|
|
parameters:
|
|
browsers:
|
|
type: boolean
|
|
default: false
|
|
docker:
|
|
- image: circleci/node:latest<<# parameters.browsers >>-browsers<</ parameters.browsers >>
|
|
working_directory: ~/project
|
|
environment:
|
|
NODE_ENV: test
|
|
|
|
commands:
|
|
attach-project:
|
|
steps:
|
|
- checkout
|
|
- attach_workspace:
|
|
at: ~/project
|
|
|
|
jobs:
|
|
setup:
|
|
executor: node
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
key: yarn-{{ checksum "yarn.lock" }}
|
|
- run:
|
|
name: Install Dependencies
|
|
command: NODE_ENV=dev yarn
|
|
- save_cache:
|
|
key: yarn-{{ checksum "yarn.lock" }}
|
|
paths:
|
|
- "node_modules"
|
|
- persist_to_workspace:
|
|
root: ~/project
|
|
paths:
|
|
- node_modules
|
|
|
|
lint:
|
|
executor: node
|
|
steps:
|
|
- attach-project
|
|
- run:
|
|
name: Lint
|
|
command: yarn lint
|
|
|
|
audit:
|
|
executor: node
|
|
steps:
|
|
- attach-project
|
|
- run:
|
|
name: Security Audit
|
|
command: yarn audit
|
|
|
|
test-unit:
|
|
executor: node
|
|
steps:
|
|
- attach-project
|
|
- run:
|
|
name: Unit Tests
|
|
command: yarn test:unit --coverage && yarn coverage
|
|
|
|
test-e2e-ssr:
|
|
executor: node
|
|
steps:
|
|
- attach-project
|
|
- run:
|
|
name: E2E SSR Tests
|
|
command: yarn test:e2e-ssr
|
|
- persist_to_workspace:
|
|
root: ~/project
|
|
paths:
|
|
- test/fixtures
|
|
|
|
test-e2e-browser:
|
|
parameters:
|
|
browserString:
|
|
type: string
|
|
executor:
|
|
name: node
|
|
browsers: true
|
|
steps:
|
|
- attach-project
|
|
- run:
|
|
name: E2E Browser Tests
|
|
command: yarn test:e2e-browser
|
|
environment:
|
|
BROWSER_STRING: << parameters.browserString >>
|
|
|
|
workflows:
|
|
version : 2
|
|
|
|
commit:
|
|
jobs:
|
|
- setup
|
|
- lint: { requires: [setup] }
|
|
- audit: { requires: [setup] }
|
|
- test-unit: { requires: [lint] }
|
|
- test-e2e-ssr: { requires: [lint] }
|
|
- test-e2e-browser:
|
|
name: test-e2e-firefox
|
|
browserString: firefox/headless
|
|
requires: [test-e2e-ssr]
|
|
- test-e2e-browser:
|
|
name: test-e2e-chrome
|
|
browserString: chrome/selenium
|
|
requires: [test-e2e-ssr]
|
|
- test-e2e-browser:
|
|
name: test-e2e-ie
|
|
browserString: browserstack/local/windows 7/ie:9
|
|
requires: [test-e2e-ssr]
|
|
filters:
|
|
branches: { ignore: /^pull\/.*/ }
|
|
- test-e2e-browser:
|
|
name: test-e2e-edge
|
|
browserString: browserstack/local/edge:15
|
|
requires: [test-e2e-ssr]
|
|
filters:
|
|
branches: { ignore: /^pull\/.*/ }
|
|
- test-e2e-browser:
|
|
name: test-e2e-safari
|
|
browserString: browserstack/local/os x=snow leopard/safari:5.1
|
|
requires: [test-e2e-ssr]
|
|
filters:
|
|
branches: { ignore: /^pull\/.*/ }
|
|
|
|
|