mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
ci(semantic-release): switch to github actions (#1076)
* ci: fix semantic release * ci(semantic-release): add github workflows * ci(semantic-release): run steps in one job * ci: remove travis config * ci: update coveralls and bundlewatch configs * ci: fix test coverage, remove bundlewatch config * ci: bump config * ci: bump bundlewatch * ci(semantic-release): bump release workflow
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
name: Release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Test with Coverage
|
||||||
|
run: yarn test
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: npx semantic-release
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
name: Test & Build
|
||||||
|
on: [pull_request]
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Test with Coverage
|
||||||
|
run: yarn test --coverage --coverageReporters=lcov
|
||||||
|
|
||||||
|
- name: Report Coverage
|
||||||
|
uses: coverallsapp/github-action@master
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Bundlewatch
|
||||||
|
run: npx bundlewatch
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
cache: yarn
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- stage: test
|
|
||||||
node_js: lts/*
|
|
||||||
script:
|
|
||||||
- yarn test --coverage --coverageReporters=text-lcov | coveralls
|
|
||||||
- yarn build && bundlewatch --max-size 20kb ./dist/!(*.map)
|
|
||||||
- stage: release
|
|
||||||
node_js: lts/*
|
|
||||||
deploy:
|
|
||||||
provider: script
|
|
||||||
skip_cleanup: true
|
|
||||||
script:
|
|
||||||
- yarn build
|
|
||||||
- npx semantic-release
|
|
||||||
+15
-2
@@ -105,13 +105,26 @@
|
|||||||
"!**/node_modules/**"
|
"!**/node_modules/**"
|
||||||
],
|
],
|
||||||
"coverageReporters": [
|
"coverageReporters": [
|
||||||
"html",
|
"text"
|
||||||
"text-summary"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"commitizen": {
|
"commitizen": {
|
||||||
"path": "./node_modules/cz-conventional-changelog"
|
"path": "./node_modules/cz-conventional-changelog"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"bundlewatch": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "./dist/vue-select.js",
|
||||||
|
"compression": "none",
|
||||||
|
"maxSize": "21 KB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./dist/vue-select.css",
|
||||||
|
"compression": "none",
|
||||||
|
"maxSize": "6 KB"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user