From 8a31051f1a7842ac3792c1c2df80bc332d088787 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Mon, 29 Jun 2020 10:07:11 -0700 Subject: [PATCH] chore: import Action script --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 3 --- package.json | 2 +- readme.md | 2 +- 4 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c89c265 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: CI + +on: [push, pull_request] + +jobs: + test: + name: Node.js v${{ matrix.nodejs }} + runs-on: ubuntu-latest + strategy: + matrix: + nodejs: [8, 10, 12, 14] + steps: + - uses: actions/checkout@master + with: + fetch-depth: 1 + + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.nodejs }} + + - name: (env) pnpm + run: curl -L https://raw.githubusercontent.com/pnpm/self-installer/master/install.js | node + + - name: (lerna) restore + uses: actions/cache@master + with: + path: | + node_modules + */*/node_modules + key: ${{ runner.os }}-${{ hashFiles('**/package.json') }} + + - name: Install + run: | + pnpm install + pnpm add -g nyc + + - name: Build + run: pnpm run build + + - name: Test w/ Coverage + run: nyc --include=packages pnpm test + + - name: Report + if: matrix.nodejs >= 12 + run: | + nyc report --reporter=text-lcov > coverage.lcov + bash <(curl -s https://codecov.io/bash) + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 88a8dbe..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 6 diff --git a/package.json b/package.json index 8a377c6..0937803 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "author": { "name": "Luke Edwards", "email": "luke.edwards05@gmail.com", - "url": "lukeed.com" + "url": "https://lukeed.com" }, "engines": { "node": ">=4" diff --git a/readme.md b/readme.md index aa15f95..389707f 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# tinydate [![Build Status](https://badgen.now.sh/travis/lukeed/tinydate)](https://travis-ci.org/lukeed/tinydate) +# tinydate ![CI](/~https://github.com/lukeed/tinydate/workflows/CI/badge.svg) > A tiny (349B) reusable date formatter. Extremely fast!