diff --git a/.eslintrc.js b/.eslintrc.js index cf2c75f3..356e7ed8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,8 @@ module.exports = { extends: [ './node_modules/kcd-scripts/eslint.js', - 'plugin:vue/recommended', + 'plugin:vue/vue3-recommended', + 'plugin:testing-library/vue', 'prettier/vue', ], plugins: ['vue'], @@ -12,5 +13,6 @@ 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', }, } diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 00000000..36e4130e --- /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] + 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 }} \ No newline at end of file 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..077ed5d3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
-

Vue Testing Library

+

Vue Testing Library for Vue 3


@@ -32,7 +32,6 @@ [![GitHub version][github-badge]][github] [![npm version][npm-badge]][npm] [![Discord][discord-badge]][discord] - [![MIT License][license-badge]][license] @@ -66,7 +65,7 @@ project's `devDependencies`: npm install --save-dev @testing-library/vue ``` -This library has `peerDependencies` listings for `Vue` and +This library has `peerDependencies` listings for `Vue 3` and `vue-template-compiler`. You may also be interested in installing `jest-dom` so you can use [the custom @@ -76,10 +75,8 @@ Jest matchers][jest-dom]. ```html diff --git a/src/__tests__/components/Form.vue b/src/__tests__/components/Form.vue index 809bf316..ffa729f2 100644 --- a/src/__tests__/components/Form.vue +++ b/src/__tests__/components/Form.vue @@ -1,44 +1,42 @@