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 CI to GitHub Actions #3208

Merged
merged 7 commits into from
Aug 3, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Continous Integration

on: [push, pull_request]

jobs:
test-saucelabs:
name: Browser tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 14
cache: npm
- name: npm install
run: npm ci
- name: Build
run: npm run build
- name: Run tests
run: npm run test-saucelabs
env:
SAUCE_USERNAME: jspdf
SAUCE_ACCESS_KEY: ${{secrets.SAUCE_ACCESS_KEY}}

test-node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 10 # minimum supported version
- 14 # current LTS
- 16 # latest
name: Node.js ${{ matrix.node-version }} test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: npm install
run: npm ci
- name: Build
run: npm run build
- name: Run tests
run: npm run test-node

test-typings:
runs-on: ubuntu-latest
strategy:
matrix:
ts-version:
- '3.0'
- '4.0'
- 'latest'
name: Typings tests (typescript@${{ matrix.ts-version }})
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 14
cache: npm
- name: npm install
run: npm ci
- name: Install typescript@${{ matrix.ts-version }}
run: npm install typescript@${{ matrix.ts-version }}
- name: Run tests
run: npm run test-typings

lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 14
cache: npm
- name: npm install
run: npm ci
- name: Check Prettier
run: npm run lint
4 changes: 0 additions & 4 deletions .sauce.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ![jsPDF](https://parall.ax/parallax-2016/img/svg/jspdf-logo.svg)

[![Build Status](https://saucelabs.com/buildstatus/jspdf)](https://saucelabs.com/beta/builds/526e7fda50bd4f97a854bf10f280305d)
[![Continous Integration](https://github.com/MrRio/jsPDF/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/MrRio/jsPDF/actions/workflows/continuous-integration.yml?query=branch%3Amaster)
[![Code Climate](https://codeclimate.com/repos/57f943855cdc43705e00592f/badges/2665cddeba042dc5191f/gpa.svg)](https://codeclimate.com/repos/57f943855cdc43705e00592f/feed)
[![Test Coverage](https://codeclimate.com/repos/57f943855cdc43705e00592f/badges/2665cddeba042dc5191f/coverage.svg)](https://codeclimate.com/repos/57f943855cdc43705e00592f/coverage)
[![GitHub license](https://img.shields.io/github/license/MrRio/jsPDF.svg)](https://github.com/MrRio/jsPDF/blob/master/LICENSE)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"test-training": "node test/utils/reference-server.js",
"test-typings": "tsc -p types/tsconfig.json && tsc -p types/tsconfig-node.json",
"prettier": "prettier --write \"*.{js,ts,md,css,json}\" \"{spec,examples,src,types}/**/*.{js,ts,md,css,json}\"",
"lint": "prettier --check \"*.{js,ts,md,css,json}\" \"{spec,examples,src,types}/**/*.{js,ts,md,css,json}\"",
"pregenerate-docs": "node deletedocs.js",
"generate-docs": "jsdoc -c jsdoc.json --readme README.md"
}
Expand Down