Skip to content

Commit 9abafe4

Browse files
chore: Switch to GitHub Actions (#160)
1 parent f3de166 commit 9abafe4

File tree

4 files changed

+141
-92
lines changed

4 files changed

+141
-92
lines changed

.github/workflows/validate.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: validate
2+
on: [push, pull_request]
3+
jobs:
4+
main:
5+
strategy:
6+
matrix:
7+
node: [10.18, 10, 12, 14, 15]
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: ⬇️ Checkout repo
11+
uses: actions/checkout@v2
12+
13+
- name: ⎔ Setup node
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: ${{ matrix.node }}
17+
18+
- name: 📥 Download deps
19+
uses: bahmutov/npm-install@v1
20+
with:
21+
useLockFile: false
22+
23+
- name: ▶️ Run validate script
24+
run: npm run validate
25+
26+
- name: ⬆️ Upload coverage report
27+
uses: codecov/codecov-action@v1
28+
29+
release:
30+
needs: main
31+
runs-on: ubuntu-latest
32+
if:
33+
${{ github.repository == 'MichaelDeBoey/gatsby-remark-embedder' &&
34+
contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha',
35+
github.ref) && github.event_name == 'push' }}
36+
steps:
37+
- name: ⬇️ Checkout repo
38+
uses: actions/checkout@v2
39+
40+
- name: ⎔ Setup node
41+
uses: actions/setup-node@v1
42+
with:
43+
node-version: 14
44+
45+
- name: 📥 Download deps
46+
uses: bahmutov/npm-install@v1
47+
with:
48+
useLockFile: false
49+
50+
- name: 🏗 Run build script
51+
run: npm run build
52+
53+
- name: 🚀 Release
54+
uses: cycjimmy/semantic-release-action@v2
55+
with:
56+
semantic_version: 17
57+
branches: |
58+
[
59+
'+([0-9])?(.{+([0-9]),x}).x',
60+
'master',
61+
'next',
62+
'next-major',
63+
{name: 'beta', prerelease: true},
64+
{name: 'alpha', prerelease: true}
65+
]
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.travis.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

README.md

Lines changed: 52 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,18 @@ testing practices.</p>
1818

1919
</div>
2020

21-
<hr />
21+
---
2222

23+
<!-- prettier-ignore-start -->
2324
[![Build Status][build-badge]][build]
2425
[![Code Coverage][coverage-badge]][coverage]
25-
[![version][version-badge]][package] [![downloads][downloads-badge]][npmtrends]
26+
[![version][version-badge]][package]
27+
[![downloads][downloads-badge]][npmtrends]
2628
[![MIT License][license-badge]][license]
27-
28-
[![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors)
29-
[![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc]
30-
[![Discord][discord-badge]][discord]
31-
32-
[![Watch on GitHub][github-watch-badge]][github-watch]
33-
[![Star on GitHub][github-star-badge]][github-star]
34-
[![Tweet][twitter-badge]][twitter]
29+
[![All Contributors][all-contributors-badge]](#contributors-)
30+
[![PRs Welcome][prs-badge]][prs]
31+
[![Code of Conduct][coc-badge]][coc]
32+
<!-- prettier-ignore-end -->
3533

3634
<div align="center">
3735
<a href="https://testingjavascript.com">
@@ -65,7 +63,10 @@ This allows you to use all the useful
6563
- [Differences from DOM Testing Library](#differences-from-dom-testing-library)
6664
- [Config testIdAttribute](#config-testidattribute)
6765
- [Other Solutions](#other-solutions)
68-
- [Contributors](#contributors)
66+
- [Issues](#issues)
67+
- [🐛 Bugs](#-bugs)
68+
- [💡 Feature Requests](#-feature-requests)
69+
- [Contributors ✨](#contributors-)
6970
- [LICENSE](#license)
7071

7172
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -196,7 +197,25 @@ It accepts all configurations listed in
196197
I'm not aware of any, if you are please [make a pull request][prs] and add it
197198
here!
198199

199-
## Contributors
200+
## Issues
201+
202+
_Looking to contribute? Look for the [Good First Issue][good-first-issue]
203+
label._
204+
205+
### 🐛 Bugs
206+
207+
Please file an issue for bugs, missing documentation, or unexpected behavior.
208+
209+
[**See Bugs**][bugs]
210+
211+
### 💡 Feature Requests
212+
213+
Please file an issue to suggest new features. Vote on feature requests by adding
214+
a 👍. This helps maintainers prioritize what to work on.
215+
216+
[**See Feature Requests**][requests]
217+
218+
## Contributors ✨
200219

201220
Thanks goes to these people ([emoji key][emojis]):
202221

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

254273
<!-- markdownlint-enable -->
255274
<!-- prettier-ignore-end -->
275+
256276
<!-- ALL-CONTRIBUTORS-LIST:END -->
257277

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

263283
MIT
264284

265-
[npm]: https://www.npmjs.com/
285+
<!-- prettier-ignore-start -->
286+
[npm]: https://npmjs.com
266287
[node]: https://nodejs.org
267-
[build-badge]:
268-
https://img.shields.io/travis/testing-library/cypress-testing-library.svg?style=flat-square
269-
[build]: https://travis-ci.org/testing-library/cypress-testing-library
270-
[coverage-badge]:
271-
https://img.shields.io/codecov/c/github/testing-library/cypress-testing-library.svg?style=flat-square
288+
[build-badge]: https://img.shields.io/github/workflow/status/testing-library/cypress-testing-library/validate?logo=github&style=flat-square
289+
[build]: https://github.com/testing-library/cypress-testing-library/actions?query=workflow%3Avalidate
290+
[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/cypress-testing-library.svg?style=flat-square
272291
[coverage]: https://codecov.io/github/testing-library/cypress-testing-library
273-
[version-badge]:
274-
https://img.shields.io/npm/v/cypress-testing-library.svg?style=flat-square
292+
[version-badge]: https://img.shields.io/npm/v/@testing-library/cypress.svg?style=flat-square
275293
[package]: https://www.npmjs.com/package/@testing-library/cypress
276-
[downloads-badge]:
277-
https://img.shields.io/npm/dm/@testing-library/cypress.svg?style=flat-square
294+
[downloads-badge]: https://img.shields.io/npm/dm/@testing-library/cypress.svg?style=flat-square
278295
[npmtrends]: http://www.npmtrends.com/@testing-library/cypress
279-
[license-badge]:
280-
https://img.shields.io/npm/l/@testing-library/cypress.svg?style=flat-square
281-
[license]:
282-
https://github.com/testing-library/cypress-testing-library/blob/master/LICENSE
283-
[prs-badge]:
284-
https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
296+
[license-badge]: https://img.shields.io/npm/l/@testing-library/cypress.svg?style=flat-square
297+
[license]: https://github.com/testing-library/cypress-testing-library/blob/master/LICENSE
298+
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
285299
[prs]: http://makeapullrequest.com
286-
[coc-badge]:
287-
https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
288-
[coc]:
289-
https://github.com/testing-library/cypress-testing-library/blob/master/other/CODE_OF_CONDUCT.md
290-
[github-watch-badge]:
291-
https://img.shields.io/github/watchers/testing-library/cypress-testing-library.svg?style=social
292-
[github-watch]:
293-
https://github.com/testing-library/cypress-testing-library/watchers
294-
[github-star-badge]:
295-
https://img.shields.io/github/stars/testing-library/cypress-testing-library.svg?style=social
296-
[github-star]:
297-
https://github.com/testing-library/cypress-testing-library/stargazers
298-
[twitter]:
299-
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
300-
[twitter-badge]:
301-
https://img.shields.io/twitter/url/https/github.com/testing-library/cypress-testing-library.svg?style=social
302-
[emojis]: https://github.com/kentcdodds/all-contributors#emoji-key
300+
[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
301+
[coc]: https://github.com/testing-library/cypress-testing-library/blob/master/other/CODE_OF_CONDUCT.md
302+
[emojis]: https://allcontributors.org/docs/en/emoji-key
303303
[all-contributors]: https://github.com/all-contributors/all-contributors
304+
[all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/cypress-testing-library?color=orange&style=flat-square
305+
[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
306+
[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
307+
[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
308+
309+
[cypress]: https://cypress.io
304310
[dom-testing-library]: https://github.com/testing-library/dom-testing-library
305-
[cypress]: https://www.cypress.io/
306-
[discord-badge]:
307-
https://img.shields.io/discord/723559267868737556.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square
308-
[discord]: https://discord.gg/c6JN9fM
311+
<!-- prettier-ignore-end -->

other/MAINTAINING.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Maintaining
22

3+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5+
6+
**Table of Contents**
7+
8+
- [Code of Conduct](#code-of-conduct)
9+
- [Issues](#issues)
10+
- [Pull Requests](#pull-requests)
11+
- [Release](#release)
12+
- [Thanks!](#thanks)
13+
14+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
15+
316
This is documentation for maintainers of this project.
417

518
## Code of Conduct
@@ -32,24 +45,24 @@ any more of you than that.
3245
As a maintainer, you're fine to make your branches on the main repo or on your
3346
own fork. Either way is fine.
3447

35-
When we receive a pull request, a travis build is kicked off automatically (see
36-
the `.travis.yml` for what runs in the travis build). We avoid merging anything
37-
that breaks the travis build.
48+
When we receive a pull request, a GitHub Action is kicked off automatically (see
49+
the `.github/workflows/validate.yml` for what runs in the Action). We avoid
50+
merging anything that breaks the GitHub Action.
3851

3952
Please review PRs and focus on the code rather than the individual. You never
4053
know when this is someone's first ever PR and we want their experience to be as
4154
positive as possible, so be uplifting and constructive.
4255

4356
When you merge the pull request, 99% of the time you should use the
44-
[Squash and merge](https://help.github.com/articles/merging-a-pull-request/)
57+
[Squash and merge](https://help.github.com/articles/merging-a-pull-request)
4558
feature. This keeps our git history clean, but more importantly, this allows us
4659
to make any necessary changes to the commit message so we release what we want
4760
to release. See the next section on Releases for more about that.
4861

4962
## Release
5063

5164
Our releases are automatic. They happen whenever code lands into `master`. A
52-
travis build gets kicked off and if it's successful, a tool called
65+
GitHub Action gets kicked off and if it's successful, a tool called
5366
[`semantic-release`](https://github.com/semantic-release/semantic-release) is
5467
used to automatically publish a new release to npm as well as a changelog to
5568
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
6679

6780
Thank you so much for helping to maintain this project!
6881

69-
[commit]:
70-
https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
82+
<!-- prettier-ignore-start -->
83+
[commit]: https://github.com/conventional-changelog-archived-repos/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
84+
<!-- prettier-ignore-end -->

0 commit comments

Comments
 (0)