Skip to content

Commit

Permalink
ci: add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowgate15 committed Dec 7, 2021
1 parent 5c7f032 commit f4e9b8b
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 13 deletions.
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: "\U0001F41E Bug report"
about: Something is not working as it should
title: "[fix] DESCRIPTIVE TITLE"
labels: bug
assignees: ''

---

#### Describe the bug

- Node.js version:
- OS & version:

<!-- A clear and concise description of what the bug is. -->

#### Actual behavior

...

#### Expected behavior

...

#### Code to reproduce

```js
...
```

<!--
We encourage you to submit a pull request with a failing test:
- This will make it more likely for us to prioritize your issue.
- It's a good way to prove that the issue is related to Got and not your code.
Example: https://github.com/avajs/ava/blob/master/docs/01-writing-tests.md#failing-tests
-->

#### Checklist

- [ ] I have read the documentation.
- [ ] I have tried my code with the latest version of Node.js and @breejs/later.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/--feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "⭐ Feature request"
about: Suggest an idea for Bree
title: "[feat] DESCRIPTIVE TITLE"
labels: enhancement
assignees: ''

---

#### What problem are you trying to solve?

...

#### Describe the feature

...

<!-- Include a usage example of the feature. If the feature is currently possible with a workaround, include that too. -->

#### Checklist

- [ ] I have read the documentation and made sure this feature doesn't already exist.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/--question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: "❓ Question"
about: Something is unclear or needs to be discussed
title: "[discussion] DESCRIPTIVE TITLE"
labels: question
assignees: ''

---

#### What would you like to discuss?

...

#### Checklist

- [ ] I have read the documentation.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on: [push, pull_request]

jobs:
test-coverage:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os:
- ubuntu-latest
node_version:
- 10
- 12
- 14
- 16

name: Node ${{ matrix.node_version }} on ${{ matrix.os }}

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}

- name: Install yarn
run: npm install -g yarn

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Run tests
run: yarn test-coverage

- name: Run coverage
run: yarn coverage

- name: Uninstall yarn
if: always()
run: npm uninstall -g yarn
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @breejs/later

[![build status](https://img.shields.io/travis/com/breejs/later.svg)](https://travis-ci.com/breejs/later)
[![build status](https://img.shields.io/github/workflow/status/breejs/later/ci)](https://github.com/breejs/later/actions/workflows/ci.yml)
[![code coverage](https://img.shields.io/codecov/c/github/breejs/later.svg)](https://codecov.io/gh/breejs/later)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
Expand Down Expand Up @@ -96,7 +96,7 @@ Assuming you are using [browserify][], [webpack][], [rollup][], or another bundl
[MIT](LICENSE) © BunKat


##
##

[npm]: https://www.npmjs.com/

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"minify": "cross-env NODE_ENV=production browserify src/index.js -o dist/later.min.js -s later -g [ babelify --configFile ./.dist.babelrc ] -p tinyify",
"nyc": "cross-env NODE_ENV=test nyc mocha test/**/*-test.js --reporter dot",
"pretest": "yarn run build && yarn run lint",
"test": "cross-env NODE_ENV=test mocha test/**/*-test.js --reporter spec",
"test": "cross-env NODE_ENV=test mocha test/**/*-test.js --reporter dot",
"test-coverage": "cross-env NODE_ENV=test nyc yarn run test"
},
"unpkg": "dist/later.min.js",
Expand Down

0 comments on commit f4e9b8b

Please sign in to comment.