Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Travis-CI to GitHub Actions #38

Merged
merged 3 commits into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push

jobs:
build:
name: Build & test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 10.x, 12.x, 14.x, 15.x ]

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
run: yarn install --prefer-offline

- name: Clear local caches
run: yarn clean

- name: Run CI checks
run: yarn all:readonly

- name: Build package
run: yarn build

- name: Report test coverage to coveralls.io
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ github.token }}
11 changes: 0 additions & 11 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
Expand Up @@ -3,10 +3,10 @@
A minimal JS cache. Like using an object to store keys and values, except it won't grow forever

[![npm version](https://img.shields.io/npm/v/limited-cache.svg)](https://www.npmjs.com/package/limited-cache)
[![build status](https://img.shields.io/travis/com/spautz/limited-cache.svg)](https://travis-ci.com/spautz/limited-cache)
[![build status](https://github.com/spautz/limited-cache/workflows/CI/badge.svg)](https://github.com/spautz/limited-cache/actions)
[![dependencies status](https://img.shields.io/badge/dependencies-none-green.svg)](https://david-dm.org/spautz/limited-cache)
[![gzip size](https://img.badgesize.io/https://unpkg.com/limited-cache@latest/dist/limited-cache.cjs.production.min.js?compression=gzip)](https://bundlephobia.com/result?p=limited-cache)
[![test coverage](https://img.shields.io/coveralls/github/spautz/limited-cache.svg)](https://coveralls.io/github/spautz/limited-cache)
[![test coverage](https://img.shields.io/coveralls/github/spautz/limited-cache/main.svg)](https://coveralls.io/github/spautz/limited-cache?branch=main)

## Motivation

Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"clean": "yon run build:clean && yon run test:clean && rimraf node_modules/.cache/",
"dev": "yon run format && yon run types && yon run lint",
"dev:readonly": "yon run format:verify && yon run types && yon run lint",
"all": "yon run clean && yon run dev && yon run test:nowatch && yon run build",
"all:readonly": "yon run clean && yon run dev:readonly && yon run test:nowatch",
"all": "yon run clean && yon run dev && yon run test:coverage && yon run build",
"all:readonly": "yon run clean && yon run dev:readonly && yon run test:coverage",
"ci": "yon run clean && yon run dev:readonly && yon run test:report",
"____ INDIVIDUAL COMMANDS ___________________________________________": "",
"build": "tsdx build",
Expand All @@ -74,14 +74,12 @@
"test:nowatch": "tsdx test",
"test:watch": "tsdx test --watch",
"test:watchcoverage": "tsdx test --watchAll --coverage",
"test:report": "tsdx test --coverage && coveralls < ./coverage/lcov.info",
"types": "tsc --noEmit --p tsconfig.json"
},
"dependencies": {},
"devDependencies": {
"@types/jest": "26.0.20",
"@types/node": "14.14.31",
"coveralls": "3.1.0",
"husky": "5.1.0",
"lint-staged": "10.5.4",
"pinst": "2.1.4",
Expand Down
29 changes: 4 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1089,9 +1089,9 @@
resolve "^1.17.0"

"@rollup/plugin-replace@^2.2.1":
version "2.3.4"
resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.3.4.tgz#7dd84c17755d62b509577f2db37eb524d7ca88ca"
integrity sha512-waBhMzyAtjCL1GwZes2jaE9MjuQ/DQF2BatH3fRivUF3z0JBFrU0U6iBNC/4WR+2rLKhaAhPWDNPYp4mI6RqdQ==
version "2.4.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.4.0.tgz#ec80629a0a922ec53719f2dea2f7714fb9231031"
integrity sha512-QGuKCj9fTegKtLh1zsxNWP5uVmUctbFOG9S8wIir5dDO7qzGyISmwrQjlyEN0H7ptz60+CFeVFi5x4aDQ5+L6g==
dependencies:
"@rollup/pluginutils" "^3.1.0"
magic-string "^0.25.7"
Expand Down Expand Up @@ -2319,17 +2319,6 @@ cosmiconfig@^7.0.0:
path-type "^4.0.0"
yaml "^1.10.0"

coveralls@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b"
integrity sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ==
dependencies:
js-yaml "^3.13.1"
lcov-parse "^1.0.0"
log-driver "^1.2.7"
minimist "^1.2.5"
request "^2.88.2"

cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
Expand Down Expand Up @@ -4519,11 +4508,6 @@ language-tags@^1.0.5:
dependencies:
language-subtag-registry "~0.3.2"

lcov-parse@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0"
integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A=

leven@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
Expand Down Expand Up @@ -4669,11 +4653,6 @@ lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==

log-driver@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==

log-symbols@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4"
Expand Down Expand Up @@ -5836,7 +5815,7 @@ request-promise-native@^1.0.7:
stealthy-require "^1.1.1"
tough-cookie "^2.3.3"

request@^2.88.0, request@^2.88.2:
request@^2.88.0:
version "2.88.2"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
Expand Down