diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b7a1ebc --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..874868b --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0852ace..0000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/package.json b/package.json index f6cf0c2..d41a857 100644 --- a/package.json +++ b/package.json @@ -105,13 +105,26 @@ "!**/node_modules/**" ], "coverageReporters": [ - "html", - "text-summary" + "text" ] }, "config": { "commitizen": { "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" + } + ] } }