mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
add circleCI pipeline
This commit is contained in:
parent
ca1242d5ec
commit
731ce56067
@ -1,9 +1,13 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
|
||||
defaults: &defaults
|
||||
working_directory: /usr/src/app
|
||||
docker:
|
||||
- image: banian/node-headless-chrome
|
||||
|
||||
jobs:
|
||||
install:
|
||||
<<: *defaults
|
||||
steps:
|
||||
# Checkout repository
|
||||
- checkout
|
||||
@ -23,17 +27,54 @@ jobs:
|
||||
paths:
|
||||
- "node_modules"
|
||||
|
||||
# Test
|
||||
lint:
|
||||
<<: *defaults
|
||||
- run:
|
||||
name: Tests
|
||||
command: NODE_ENV=test yarn test && yarn coverage
|
||||
name: ESLint
|
||||
command: yarn lint
|
||||
|
||||
# Release edge
|
||||
build:
|
||||
<<: *defaults
|
||||
- run:
|
||||
name: Publish nuxt-edge
|
||||
name: Build Fixtures
|
||||
command: yarn build-fixtures
|
||||
|
||||
test:
|
||||
<<: *defaults
|
||||
- run:
|
||||
name: Test
|
||||
command: yarn jest test/
|
||||
|
||||
release:
|
||||
- run:
|
||||
name: release
|
||||
command: |
|
||||
if [ "${CIRCLE_BRANCH}" == "dev" ]; then
|
||||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
|
||||
./scripts/release-edge
|
||||
fi
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
install-and-parallel-test:
|
||||
jobs:
|
||||
- install
|
||||
|
||||
- lint:
|
||||
requires:
|
||||
- install
|
||||
|
||||
- build:
|
||||
requires:
|
||||
- install
|
||||
|
||||
- test:
|
||||
requires:
|
||||
- build
|
||||
|
||||
- release:
|
||||
requires:
|
||||
- build
|
||||
- lint
|
||||
- test
|
||||
|
@ -1,21 +1,8 @@
|
||||
module.exports = {
|
||||
'testEnvironment': 'node',
|
||||
'coverageDirectory': './coverage/',
|
||||
'collectCoverage': false,
|
||||
'setupTestFrameworkScriptFile': './test/utils/setup',
|
||||
'testMatch': [
|
||||
'<rootDir>/test/*.test.js'
|
||||
],
|
||||
'projects': [
|
||||
// {
|
||||
// 'displayName': 'Lint',
|
||||
// 'runner': 'jest-runner-eslint',
|
||||
// 'testMatch': [
|
||||
// '<rootDir>/lib/*.js'
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
'displayName': 'Test'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -42,17 +42,13 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build-fixtures": "node ./scripts/build-fixtures",
|
||||
"test": "npm run lint && npm run build-fixtures && jest test/",
|
||||
"test": "npm run build-fixtures && jest",
|
||||
"test:unit": "jest",
|
||||
"coverage": "codecov",
|
||||
"lint": "eslint --ext .js,.mjs,.vue bin/* build/ lib/ test/ examples/",
|
||||
"precommit": "npm run lint",
|
||||
"postinstall": "opencollective postinstall || exit 0"
|
||||
},
|
||||
"jest": {
|
||||
"coverageDirectory": "./coverage/",
|
||||
"collectCoverage": true
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0",
|
||||
"npm": ">=5.0.0"
|
||||
|
Loading…
Reference in New Issue
Block a user