Skip to content

Commit

Permalink
Migrate from TravisCI -> GitHub Actions (#2606)
Browse files Browse the repository at this point in the history
This moves the test suite from Travis -> GitHub Actions. The Workflow
is essentially the same as what we had on Travis, but split into two
jobs.
  • Loading branch information
mAAdhaTTah committed Oct 24, 2020
1 parent 7cdfe55 commit 6913204
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 32 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,46 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
tests:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test

build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: |
git add --all && \
git diff-index --cached HEAD --stat --exit-code || \
(echo && echo "The above files changed because the build is not up to date." && echo "Please rebuild Prism." && exit 1)
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# [Prism](https://prismjs.com/)

[![Build Status](https://travis-ci.org/PrismJS/prism.svg?branch=master)](https://travis-ci.org/PrismJS/prism)
[![Build Status](https://github.com/PrismJS/prism/workflows/CI/badge.svg)](https://github.com/PrismJS/prism/actions)
[![npm](https://img.shields.io/npm/dw/prismjs.svg)](https://www.npmjs.com/package/prismjs)

Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from [Dabblet](https://dabblet.com/).
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Expand Up @@ -52,7 +52,7 @@ <h2><a href="index.html">Home</a></h2><h2><a href="https://prismjs.com" class="m

<section class="readme usertext">
<article><h1><a href="https://prismjs.com/">Prism</a></h1>
<p><a href="https://travis-ci.org/PrismJS/prism"><img src="https://travis-ci.org/PrismJS/prism.svg?branch=master" alt="Build Status"></a>
<p><a href="https://github.com/PrismJS/prism/actions"><img src="https://github.com/PrismJS/prism/workflows/CI/badge.svg" alt="Build Status"></a>
<a href="https://www.npmjs.com/package/prismjs"><img src="https://img.shields.io/npm/dw/prismjs.svg" alt="npm"></a></p>
<p>Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from <a href="https://dabblet.com/">Dabblet</a>.</p>
<p>You can learn more on <a href="https://prismjs.com/">prismjs.com</a>.</p>
Expand Down

0 comments on commit 6913204

Please sign in to comment.