diff --git a/.eslintrc.js b/.eslintrc.js index cf2c75f3..612dd456 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,5 +12,7 @@ module.exports = { 'testing-library/no-dom-import': 'off', 'testing-library/prefer-screen-queries': 'off', 'testing-library/no-manual-cleanup': 'off', + 'testing-library/no-await-sync-events': 'off', + 'testing-library/await-fire-event': 'error', }, } diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 00000000..2c78a12f --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,81 @@ +name: validate +on: + push: + branches: + [ + '+([0-9])?(.{+([0-9]),x}).x', + 'master', + 'next', + 'next-major', + 'beta', + 'alpha', + '!all-contributors/**', + ] + pull_request: + branches-ignore: ['all-contributors/**'] +jobs: + main: + strategy: + matrix: + node: [10.13, 12, 14, 15] + runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v2 + + - name: ⎔ Setup node + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: 📥 Download deps + uses: bahmutov/npm-install@v1 + with: + useLockFile: false + + - name: ▶️ Run validate script + run: npm run validate + + - name: ⬆️ Upload coverage report + uses: codecov/codecov-action@v1 + + release: + needs: main + runs-on: ubuntu-latest + if: + ${{ github.repository == 'testing-library/vue-testing-library' && + contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha', + github.ref) && github.event_name == 'push' }} + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v2 + + - name: ⎔ Setup node + uses: actions/setup-node@v1 + with: + node-version: 14 + + - name: 📥 Download deps + uses: bahmutov/npm-install@v1 + with: + useLockFile: false + + - name: 🏗 Run build script + run: npm run build + + - name: 🚀 Release + uses: cycjimmy/semantic-release-action@v2 + with: + semantic_version: 17 + branches: | + [ + '+([0-9])?(.{+([0-9]),x}).x', + 'master', + 'next', + 'next-major', + {name: 'beta', prerelease: true}, + {name: 'alpha', prerelease: true} + ] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 91989b6d..00000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -sudo: false -language: node_js -cache: npm -notifications: - email: false -node_js: - - 10.18 - - 12 - - 14 - - 15 -before_install: - - nvm install-latest-npm -install: npm install -script: - - npm run validate - - npx codecov@3 -branches: - only: - - master - - beta - - next - -jobs: - include: - - stage: release - node_js: 14 - script: kcd-scripts travis-release - if: fork = false diff --git a/README.md b/README.md index 735f0594..145dcc8f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,6 @@ [![GitHub version][github-badge]][github] [![npm version][npm-badge]][npm] [![Discord][discord-badge]][discord] - [![MIT License][license-badge]][license] @@ -237,8 +236,8 @@ instead of filing an issue on GitHub. [![cilice](https://avatars2.githubusercontent.com/u/835588?v=3&s=120)](https://github.com/cilice) -[build-badge]: https://travis-ci.org/testing-library/vue-testing-library.svg?branch=master -[build]: https://travis-ci.org/testing-library/vue-testing-library +[build-badge]: https://img.shields.io/github/workflow/status/testing-library/vue-testing-library/validate?logo=github +[build]: https://github.com/testing-library/vue-testing-library/actions?query=workflow%3Avalidate [coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/vue-testing-library.svg [coverage]: https://codecov.io/github/testing-library/vue-testing-library [github-badge]: https://badge.fury.io/gh/testing-library%2Fvue-testing-library.svg