From f4e9b8bdbe78c1f109ddb4bd5012c9570718930f Mon Sep 17 00:00:00 2001 From: Taylor Schley Date: Tue, 7 Dec 2021 13:59:56 -0600 Subject: [PATCH] ci: add github actions --- .github/ISSUE_TEMPLATE/---bug-report.md | 42 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/--feature-request.md | 22 +++++++++++ .github/ISSUE_TEMPLATE/--question.md | 16 ++++++++ .github/workflows/ci.yml | 44 +++++++++++++++++++++ .travis.yml | 10 ----- README.md | 4 +- package.json | 2 +- 7 files changed, 127 insertions(+), 13 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/---bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/--feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/--question.md create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/ISSUE_TEMPLATE/---bug-report.md b/.github/ISSUE_TEMPLATE/---bug-report.md new file mode 100644 index 0000000..e1605d8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---bug-report.md @@ -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: + + + +#### Actual behavior + +... + +#### Expected behavior + +... + +#### Code to reproduce + +```js +... +``` + + + +#### Checklist + +- [ ] I have read the documentation. +- [ ] I have tried my code with the latest version of Node.js and @breejs/later. diff --git a/.github/ISSUE_TEMPLATE/--feature-request.md b/.github/ISSUE_TEMPLATE/--feature-request.md new file mode 100644 index 0000000..77098b5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/--feature-request.md @@ -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 + +... + + + +#### Checklist + +- [ ] I have read the documentation and made sure this feature doesn't already exist. diff --git a/.github/ISSUE_TEMPLATE/--question.md b/.github/ISSUE_TEMPLATE/--question.md new file mode 100644 index 0000000..1c7d0c5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/--question.md @@ -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. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a10868e --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f137e9d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 10 - - 12 - - 14 - - 16 -script: - - npm run test-coverage -after_success: - - npm run coverage diff --git a/README.md b/README.md index 3706ee5..27a1749 100644 --- a/README.md +++ b/README.md @@ -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) @@ -96,7 +96,7 @@ Assuming you are using [browserify][], [webpack][], [rollup][], or another bundl [MIT](LICENSE) © BunKat -## +## [npm]: https://www.npmjs.com/ diff --git a/package.json b/package.json index 94d8d45..54402de 100644 --- a/package.json +++ b/package.json @@ -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",