Skip to content

Commit 6cf3161

Browse files
authored
Merge pull request #12 from markedjs/github-actions
GitHub actions
2 parents 0a71aaf + 93ccb89 commit 6cf3161

File tree

5 files changed

+9385
-1649
lines changed

5 files changed

+9385
-1649
lines changed

.github/workflows/tests.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: "CI"
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
10+
Test:
11+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v2
16+
- name: Install Node
17+
uses: dcodeIO/setup-node-nvm@master
18+
with:
19+
node-version: node
20+
- name: Install Dependencies
21+
run: npm ci
22+
- name: Run Tests 👩🏽‍💻
23+
run: |
24+
npm run unit-test
25+
npm run func-test
26+
npm run logger-test
27+
28+
Coverage:
29+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout Code
33+
uses: actions/checkout@v2
34+
- name: Install Node
35+
uses: dcodeIO/setup-node-nvm@master
36+
with:
37+
node-version: 'lts/*'
38+
- name: Install Dependencies
39+
run: npm ci
40+
- name: Run Tests 👩🏽‍💻
41+
run: npm run cover
42+
43+
Lint:
44+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout Code
48+
uses: actions/checkout@v2
49+
- name: Install Dependencies
50+
run: npm ci
51+
- name: Lint ✨
52+
run: npm run lint
53+
54+
Release:
55+
needs: [Test, Coverage, Lint]
56+
if: github.ref == 'refs/heads/master'
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout Code
60+
uses: actions/checkout@v2
61+
- name: Install Dependencies
62+
run: npm ci
63+
- name: Release 🎉
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
67+
run: npx semantic-release
68+
69+
Skip:
70+
if: contains(github.event.head_commit.message, '[skip ci]')
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Skip CI 🚫
74+
run: echo skip ci

.travis.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# html-differ
2-
[![Build Status](https://travis-ci.org/markedjs/html-differ.svg)](https://travis-ci.org/markedjs/html-differ)
2+
[![Build Status](https://github.com/markedjs/html-differ/workflows/CI/badge.svg)](https://github.com/markedjs/html-differ/actions)
33
[![Install Size](https://packagephobia.now.sh/badge?p=@markedjs/html-differ)](https://packagephobia.now.sh/result?p=@markedjs/html-differ)
44
[![Dependency Status](https://david-dm.org/markedjs/html-differ.svg)](https://david-dm.org/markedjs/html-differ)
55
[![devDependency Status](https://david-dm.org/markedjs/html-differ/dev-status.svg)](https://david-dm.org/markedjs/html-differ?type=dev)

0 commit comments

Comments
 (0)