chore(ci): update CI to lastest node versions & github actions

* update CI node versions to match node supported versions
* remove node 17.x on appveyor, it only supports up to node 16.x
* travis CI is not longer free/working; remove it in favor of github actions
This commit is contained in:
Devyn S 2021-11-09 13:05:44 -07:00 committed by GitHub
parent a9f38b6f05
commit 9c362e832e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 38 additions and 32 deletions

View File

@ -7,15 +7,17 @@
# What combinations to test # What combinations to test
environment: environment:
matrix: matrix:
- nodejs_version: "6" - nodejs_version: "12"
platform: x64 platform: x64
- nodejs_version: "6" - nodejs_version: "12"
platform: x86 platform: x86
- nodejs_version: "8" - nodejs_version: "14"
platform: x86 platform: x86
- nodejs_version: "8" - nodejs_version: "14"
platform: x64 platform: x64
- nodejs_version: "10" - nodejs_version: "16"
platform: x86
- nodejs_version: "16"
platform: x64 platform: x64
cache: cache:
- node_modules - node_modules

30
.github/workflows/node.js.yml vendored Normal file
View File

@ -0,0 +1,30 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 17.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test

View File

@ -1,26 +0,0 @@
language: node_js
node_js:
- "6"
- "8"
- "10"
before_install:
- npm install -g grunt-cli
# travis build speed up
sudo: false
cache:
directories:
- node_modules
# scripts
script: grunt test
# hooks
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/e369617839852624aa69
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false

View File

@ -1,6 +1,6 @@
![Showdown][sd-logo] ![Showdown][sd-logo]
[![Build Status: Linux](https://travis-ci.org/showdownjs/showdown.svg?branch=master)](https://travis-ci.org/showdownjs/showdown) ![Build Status: Linux](https://github.com/showdownjs/showdown/actions/workflows/node.js.yml/badge.svg)
[![Build Status: Windows](https://ci.appveyor.com/api/projects/status/github/showdownjs/showdown?branch=master&svg=true)](https://ci.appveyor.com/project/tivie/showdown/branch/master) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/github/showdownjs/showdown?branch=master&svg=true)](https://ci.appveyor.com/project/tivie/showdown/branch/master)
[![npm version](https://badge.fury.io/js/showdown.svg)](http://badge.fury.io/js/showdown) [![npm version](https://badge.fury.io/js/showdown.svg)](http://badge.fury.io/js/showdown)
[![Bower version](https://badge.fury.io/bo/showdown.svg)](http://badge.fury.io/bo/showdown) [![Bower version](https://badge.fury.io/bo/showdown.svg)](http://badge.fury.io/bo/showdown)