Skip to content

chore: Switch to GitHub Actions #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -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 }}
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

101 changes: 52 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,18 @@ testing practices.</p>

</div>

<hr />
---

<!-- prettier-ignore-start -->
[![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]
<!-- prettier-ignore-end -->

<div align="center">
<a href="https://testingjavascript.com">
Expand Down Expand Up @@ -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)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Expand Down Expand Up @@ -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]):

Expand Down Expand Up @@ -253,6 +272,7 @@ Thanks goes to these people ([emoji key][emojis]):

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors][all-contributors] specification.
Expand All @@ -262,47 +282,30 @@ Contributions of any kind welcome!

MIT

[npm]: https://www.npmjs.com/
<!-- prettier-ignore-start -->
[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%2Fhub.490633.xyz%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
<!-- prettier-ignore-end -->
28 changes: 21 additions & 7 deletions other/MAINTAINING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Maintaining

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

**Table of Contents**

- [Code of Conduct](#code-of-conduct)
- [Issues](#issues)
- [Pull Requests](#pull-requests)
- [Release](#release)
- [Thanks!](#thanks)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

This is documentation for maintainers of this project.

## Code of Conduct
Expand Down Expand Up @@ -32,24 +45,24 @@ 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.

## 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
Expand All @@ -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
<!-- prettier-ignore-start -->
[commit]: https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
<!-- prettier-ignore-end -->