Skip to content

Commit

Permalink
👷 Enable GitHub Actions as CI for tests & coverage reports
Browse files Browse the repository at this point in the history
* remove Travis CI
  • Loading branch information
TemaSM committed Jan 29, 2023
1 parent a99db2a commit 27ceabb
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 18 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
name: Node.js ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2

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

- name: Cache Node.js modules (pnpm)
uses: actions/cache@v2
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.OS }}-${{ env.cache-name }}-node-${{ matrix.node-version }}-
restore-keys: |
${{ runner.OS }}-${{ env.cache-name }}-node-${{ matrix.node-version }}-
# pnpm much faster and better than npm & yarn, check it out: https://pnpm.io/
- uses: pnpm/action-setup@v2.0.1
with:
version: 6.7.2

- name: Install dependencies
run: pnpm install

# Here we will use pnpx to run executables, instead of running `npm run <script>` which utilizes npx
- name: Run tests
run: |
pnpx nyc mocha tests --require should
pnpx nyc report --reporter=lcovonly
timeout-minutes: 5

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
coverage:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# [Telegraf](https://github.com/telegraf/telegraf) Session local

[![NPM Version](https://img.shields.io/npm/v/telegraf-session-local.svg?style=flat-square)](https://www.npmjs.com/package/telegraf-session-local)
[![node](https://img.shields.io/node/v/telegraf-session-local.svg?style=flat-square)](https://www.npmjs.com/package/telegraf-session-local)
[![Nodejs](https://img.shields.io/node/v/telegraf-session-local.svg?style=flat-square)](https://www.npmjs.com/package/telegraf-session-local)
[![npm](https://img.shields.io/npm/dm/telegraf-session-local.svg?style=flat-square)](https://npmcharts.com/compare/telegraf-session-local,telegraf-session-redis,telegraf-session-mysql,telegraf-session-mongo,telegraf-session-dynamodb?interval=30)
[![Travis (.org) branch](https://img.shields.io/travis/RealSpeaker/telegraf-session-local/master.svg?style=flat-square)](https://travis-ci.org/RealSpeaker/telegraf-session-local)
[![Coveralls github branch](https://img.shields.io/coveralls/github/RealSpeaker/telegraf-session-local/master.svg?style=flat-square)](https://coveralls.io/github/RealSpeaker/telegraf-session-local?branch=master)
[![Codacy branch grade](https://img.shields.io/codacy/grade/761ed505ba2d44bd9a2bc598e68969e3/master.svg?style=flat-square)](https://app.codacy.com/project/RealSpeaker/telegraf-session-local/dashboard)
[![GitHub Actions Status](https://img.shields.io/github/workflow/status/RealSpeaker/telegraf-session-local/CI?style=flat-square)](https://github.com/RealSpeaker/telegraf-session-local/actions)
[![Coveralls](https://img.shields.io/coveralls/github/RealSpeaker/telegraf-session-local/master.svg?style=flat-square)](https://coveralls.io/github/RealSpeaker/telegraf-session-local?branch=master)
[![LGTM Grade](https://img.shields.io/lgtm/grade/javascript/g/RealSpeaker/telegraf-session-local.svg?style=flat-square&?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/RealSpeaker/telegraf-session-local/context:javascript)
[![David](https://img.shields.io/david/RealSpeaker/telegraf-session-local.svg?style=flat-square)](https://david-dm.org/RealSpeaker/telegraf-session-local)

> Middleware for locally stored sessions & database
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"scripts": {
"lint": "npx eslint . --fix",
"test": "npx nyc mocha tests --require should",
"coverage": "npx nyc report --reporter=text-lcov | coveralls",
"coverage": "npx nyc report --reporter=lcovonly",
"jsdoc": "npx jsdoc -c jsdoc.json",
"version": "npm run jsdoc && git add docs",
"release": "npx np"
Expand All @@ -53,7 +53,6 @@
"telegraf": "^3.38.0 || ^4.0.0"
},
"devDependencies": {
"coveralls": "^3.1.0",
"docdash": "^2.0.1",
"eslint": "^8.32.0",
"eslint-config-standard": "^17.0.0",
Expand Down

0 comments on commit 27ceabb

Please sign in to comment.