Skip to content

Commit a28d338

Browse files
committed
chore: migrate to github actions
1 parent ef28d09 commit a28d338

File tree

4 files changed

+106
-42
lines changed

4 files changed

+106
-42
lines changed

.github/workflows/validate.yml

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

.travis.yml

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

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
[![version][version-badge]][package]
2222
[![downloads][downloads-badge]][npmtrends]
2323
[![MIT License][license-badge]][license]
24-
25-
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
26-
[![All Contributors](https://img.shields.io/badge/all_contributors-66-orange.svg?style=flat-square)](#contributors-)
27-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
24+
[![All Contributors][all-contributors-badge]](#contributors)
2825
[![PRs Welcome][prs-badge]][prs]
2926
[![Code of Conduct][coc-badge]][coc]
3027
<!-- prettier-ignore-end -->
@@ -175,9 +172,9 @@ are typed. By default it's 0. You can use this option if your component has a
175172
different behavior for fast or slow users. If you do this, you need to make sure
176173
to `await`!
177174

178-
> To be clear, `userEvent.type` *always* returns a promise, but you *only* need
179-
> to `await` the promise it returns if you're using the `delay` option. Otherwise
180-
> everything runs synchronously and you can ignore the promise.
175+
> To be clear, `userEvent.type` _always_ returns a promise, but you _only_ need
176+
> to `await` the promise it returns if you're using the `delay` option.
177+
> Otherwise everything runs synchronously and you can ignore the promise.
181178
182179
`type` will click the element before typing. To disable this, set the
183180
`skipClick` option to `true`.
@@ -604,6 +601,7 @@ Thanks goes to these people ([emoji key][emojis]):
604601

605602
<!-- markdownlint-enable -->
606603
<!-- prettier-ignore-end -->
604+
607605
<!-- ALL-CONTRIBUTORS-LIST:END -->
608606

609607
This project follows the [all-contributors][all-contributors] specification.
@@ -616,8 +614,8 @@ MIT
616614
<!-- prettier-ignore-start -->
617615
[npm]: https://www.npmjs.com
618616
[node]: https://nodejs.org
619-
[build-badge]: https://img.shields.io/travis/testing-library/user-event.svg?style=flat-square
620-
[build]: https://travis-ci.org/testing-library/user-event
617+
[build-badge]: https://img.shields.io/github/workflow/status/testing-library/user-event/validate/main?logo=github&style=flat-square
618+
[build]: https://github.com/testing-library/user-event/actions?query=workflow%3Avalidate
621619
[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/user-event.svg?style=flat-square
622620
[coverage]: https://codecov.io/github/testing-library/user-event
623621
[version-badge]: https://img.shields.io/npm/v/@testing-library/user-event.svg?style=flat-square
@@ -632,6 +630,7 @@ MIT
632630
[coc]: https://github.com/testing-library/user-event/blob/master/other/CODE_OF_CONDUCT.md
633631
[emojis]: https://github.com/all-contributors/all-contributors#emoji-key
634632
[all-contributors]: https://github.com/all-contributors/all-contributors
633+
[all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/user-event?color=orange&style=flat-square
635634
[bugs]: https://github.com/testing-library/user-event/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Acreated-desc+label%3Abug
636635
[requests]: https://github.com/testing-library/user-event/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement
637636
[good-first-issue]: https://github.com/testing-library/user-event/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement+label%3A%22good+first+issue%22

other/MAINTAINING.md

Lines changed: 20 additions & 6 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,9 +45,9 @@ 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
@@ -49,7 +62,7 @@ to release. See the next section on Releases for more about that.
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)