diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..5fe3e29 --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,68 @@ +name: validate +on: [push, pull_request] +jobs: + main: + strategy: + matrix: + node: [10.18, 10, 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 == 'MichaelDeBoey/gatsby-remark-embedder' && + 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 a9264ce..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: node_js -addons: - apt: - packages: - - libgconf-2-4 -cache: - # Caches $HOME/.npm when npm ci is default script command - # Caches node_modules in all other cases - npm: true - directories: - # we also need to cache folder with Cypress binary - - ~/.cache -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 - -jobs: - include: - - stage: release - node_js: 14 - script: kcd-scripts travis-release - if: fork = false diff --git a/README.md b/README.md index b2e7810..03e0b36 100644 --- a/README.md +++ b/README.md @@ -18,20 +18,18 @@ testing practices.

-
+--- + [![Build Status][build-badge]][build] [![Code Coverage][coverage-badge]][coverage] -[![version][version-badge]][package] [![downloads][downloads-badge]][npmtrends] +[![version][version-badge]][package] +[![downloads][downloads-badge]][npmtrends] [![MIT License][license-badge]][license] - -[![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors) -[![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc] -[![Discord][discord-badge]][discord] - -[![Watch on GitHub][github-watch-badge]][github-watch] -[![Star on GitHub][github-star-badge]][github-star] -[![Tweet][twitter-badge]][twitter] +[![All Contributors][all-contributors-badge]](#contributors-) +[![PRs Welcome][prs-badge]][prs] +[![Code of Conduct][coc-badge]][coc] +
@@ -65,7 +63,10 @@ This allows you to use all the useful - [Differences from DOM Testing Library](#differences-from-dom-testing-library) - [Config testIdAttribute](#config-testidattribute) - [Other Solutions](#other-solutions) -- [Contributors](#contributors) +- [Issues](#issues) + - [🐛 Bugs](#-bugs) + - [💡 Feature Requests](#-feature-requests) +- [Contributors ✨](#contributors-) - [LICENSE](#license) @@ -196,7 +197,25 @@ It accepts all configurations listed in I'm not aware of any, if you are please [make a pull request][prs] and add it here! -## Contributors +## Issues + +_Looking to contribute? Look for the [Good First Issue][good-first-issue] +label._ + +### 🐛 Bugs + +Please file an issue for bugs, missing documentation, or unexpected behavior. + +[**See Bugs**][bugs] + +### 💡 Feature Requests + +Please file an issue to suggest new features. Vote on feature requests by adding +a 👍. This helps maintainers prioritize what to work on. + +[**See Feature Requests**][requests] + +## Contributors ✨ Thanks goes to these people ([emoji key][emojis]): @@ -253,6 +272,7 @@ Thanks goes to these people ([emoji key][emojis]): + This project follows the [all-contributors][all-contributors] specification. @@ -262,47 +282,30 @@ Contributions of any kind welcome! MIT -[npm]: https://www.npmjs.com/ + +[npm]: https://npmjs.com [node]: https://nodejs.org -[build-badge]: - https://img.shields.io/travis/testing-library/cypress-testing-library.svg?style=flat-square -[build]: https://travis-ci.org/testing-library/cypress-testing-library -[coverage-badge]: - https://img.shields.io/codecov/c/github/testing-library/cypress-testing-library.svg?style=flat-square +[build-badge]: https://img.shields.io/github/workflow/status/testing-library/cypress-testing-library/validate?logo=github&style=flat-square +[build]: https://github.com/testing-library/cypress-testing-library/actions?query=workflow%3Avalidate +[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/cypress-testing-library.svg?style=flat-square [coverage]: https://codecov.io/github/testing-library/cypress-testing-library -[version-badge]: - https://img.shields.io/npm/v/cypress-testing-library.svg?style=flat-square +[version-badge]: https://img.shields.io/npm/v/@testing-library/cypress.svg?style=flat-square [package]: https://www.npmjs.com/package/@testing-library/cypress -[downloads-badge]: - https://img.shields.io/npm/dm/@testing-library/cypress.svg?style=flat-square +[downloads-badge]: https://img.shields.io/npm/dm/@testing-library/cypress.svg?style=flat-square [npmtrends]: http://www.npmtrends.com/@testing-library/cypress -[license-badge]: - https://img.shields.io/npm/l/@testing-library/cypress.svg?style=flat-square -[license]: - https://github.com/testing-library/cypress-testing-library/blob/master/LICENSE -[prs-badge]: - https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square +[license-badge]: https://img.shields.io/npm/l/@testing-library/cypress.svg?style=flat-square +[license]: https://github.com/testing-library/cypress-testing-library/blob/master/LICENSE +[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square [prs]: http://makeapullrequest.com -[coc-badge]: - https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square -[coc]: - https://github.com/testing-library/cypress-testing-library/blob/master/other/CODE_OF_CONDUCT.md -[github-watch-badge]: - https://img.shields.io/github/watchers/testing-library/cypress-testing-library.svg?style=social -[github-watch]: - https://github.com/testing-library/cypress-testing-library/watchers -[github-star-badge]: - https://img.shields.io/github/stars/testing-library/cypress-testing-library.svg?style=social -[github-star]: - https://github.com/testing-library/cypress-testing-library/stargazers -[twitter]: - https://twitter.com/intent/tweet?text=Check%20out%20cypress-testing-library%20by%20%40kentcdodds%20https%3A%2F%2Fgithub.com%2Fkentcdodds%2Fcypress-testing-library%20%F0%9F%91%8D -[twitter-badge]: - https://img.shields.io/twitter/url/https/github.com/testing-library/cypress-testing-library.svg?style=social -[emojis]: https://github.com/kentcdodds/all-contributors#emoji-key +[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square +[coc]: https://github.com/testing-library/cypress-testing-library/blob/master/other/CODE_OF_CONDUCT.md +[emojis]: https://allcontributors.org/docs/en/emoji-key [all-contributors]: https://github.com/all-contributors/all-contributors +[all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/cypress-testing-library?color=orange&style=flat-square +[bugs]: https://github.com/testing-library/cypress-testing-library/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%90%9B+Bug%22+sort%3Acreated-desc +[requests]: https://github.com/testing-library/cypress-testing-library/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement +[good-first-issue]: https://github.com/testing-library/cypress-testing-library/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3A%22good+first+issue%22 + +[cypress]: https://cypress.io [dom-testing-library]: https://github.com/testing-library/dom-testing-library -[cypress]: https://www.cypress.io/ -[discord-badge]: - https://img.shields.io/discord/723559267868737556.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square -[discord]: https://discord.gg/c6JN9fM + diff --git a/other/MAINTAINING.md b/other/MAINTAINING.md index 703126d..7d63801 100644 --- a/other/MAINTAINING.md +++ b/other/MAINTAINING.md @@ -1,5 +1,18 @@ # Maintaining + + + +**Table of Contents** + +- [Code of Conduct](#code-of-conduct) +- [Issues](#issues) +- [Pull Requests](#pull-requests) +- [Release](#release) +- [Thanks!](#thanks) + + + This is documentation for maintainers of this project. ## Code of Conduct @@ -32,16 +45,16 @@ any more of you than that. As a maintainer, you're fine to make your branches on the main repo or on your own fork. Either way is fine. -When we receive a pull request, a travis build is kicked off automatically (see -the `.travis.yml` for what runs in the travis build). We avoid merging anything -that breaks the travis build. +When we receive a pull request, a GitHub Action is kicked off automatically (see +the `.github/workflows/validate.yml` for what runs in the Action). We avoid +merging anything that breaks the GitHub Action. Please review PRs and focus on the code rather than the individual. You never know when this is someone's first ever PR and we want their experience to be as positive as possible, so be uplifting and constructive. When you merge the pull request, 99% of the time you should use the -[Squash and merge](https://help.github.com/articles/merging-a-pull-request/) +[Squash and merge](https://help.github.com/articles/merging-a-pull-request) feature. This keeps our git history clean, but more importantly, this allows us to make any necessary changes to the commit message so we release what we want to release. See the next section on Releases for more about that. @@ -49,7 +62,7 @@ to release. See the next section on Releases for more about that. ## Release Our releases are automatic. They happen whenever code lands into `master`. A -travis build gets kicked off and if it's successful, a tool called +GitHub Action gets kicked off and if it's successful, a tool called [`semantic-release`](https://github.com/semantic-release/semantic-release) is used to automatically publish a new release to npm as well as a changelog to GitHub. It is only able to determine the version and whether a release is @@ -66,5 +79,6 @@ necessary by the git commit messages. With this in mind, **please brush up on Thank you so much for helping to maintain this project! -[commit]: - https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md + +[commit]: https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md +