mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-14 20:52:25 +03:00
fc71e1f1c4
* refactor(examples): run ssr example from server * chore: switch to babel for build buble complains too much * feat: enable loaded callbacks feat: add skip option * examples: add async-callback browser example * examples: fix server * examples(ssr): add reactive script with callback * fix: also skip on ssr * chore: remove unused var * feat: only add mutationobserver if DOM is still loading feat: disconnect mutation observer once DOM has loaded * examples: pass vmid to loadCallback instead of el * feat: also support load callbacks for link/style tags * test: add unit tests for load * test: add load e2e test * chore: fix lint * chore: remove unused files * test: fix e2e load callback test * test: fix attempt * examples: ie9 compatiblity destructuring doesnt work in ie9 * fix: add onload attribute on ssr dont rely on mutationobserver * chore: lint ci conf * refactor: remove loadCallbackAttribute config option test: fix coverage for load * test: improve coverage * fix: only use console when it exists (for ie9) * chore: fix coverage
137 lines
3.3 KiB
YAML
Executable File
137 lines
3.3 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 --groups dependencies
|
|
|
|
test-unit:
|
|
executor: node
|
|
steps:
|
|
- attach-project
|
|
- run:
|
|
name: Unit Tests
|
|
command: yarn test:unit --coverage && yarn coverage
|
|
|
|
test-types:
|
|
executor: node
|
|
steps:
|
|
- attach-project
|
|
- run:
|
|
name: Type Tests
|
|
command: yarn test:types
|
|
|
|
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-types: { 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\/.*/ }
|