Skip to content

Commit ed28137

Browse files
authored
build: switch to GitHub Actions (#206)
1 parent 9144645 commit ed28137

File tree

3 files changed

+83
-23
lines changed

3 files changed

+83
-23
lines changed

.github/workflows/workflows.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: GitHub Languages Client
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
schedule:
11+
- cron: '0 12 * * *'
12+
13+
jobs:
14+
build:
15+
name: Test & Build
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest]
20+
node: [10, 12, 14]
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
ref: ${{ github.ref }}
25+
- name: Setup Node
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: ${{ matrix.node }}
29+
- name: Cache dependencies
30+
uses: actions/cache@v2
31+
with:
32+
path: ~/.npm
33+
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
34+
restore-keys: |
35+
${{ runner.OS }}-node-
36+
${{ runner.OS }}-
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Run Linting
40+
run: npm run lint
41+
- name: Run Tests
42+
run: npm run test
43+
- name: Run Build
44+
run: npm run build
45+
coverage:
46+
name: Code Coverage
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- uses: actions/checkout@v2
51+
with:
52+
ref: ${{ github.ref }}
53+
- name: Setup Node
54+
uses: actions/setup-node@v1
55+
- name: Install dependencies
56+
run: npm ci
57+
- name: Run Tests
58+
run: npm run test
59+
- name: Codecov
60+
uses: codecov/codecov-action@v1
61+
release:
62+
name: Release
63+
runs-on: ubuntu-latest
64+
if: ${{ github.ref == 'refs/heads/master' }}
65+
needs: build
66+
steps:
67+
- uses: actions/checkout@v2
68+
with:
69+
ref: ${{ github.ref }}
70+
- name: Setup Node
71+
uses: actions/setup-node@v1
72+
- name: Install dependencies
73+
run: npm ci
74+
- name: Run Build
75+
run: npm run compile
76+
- name: Semantic Release
77+
uses: cycjimmy/semantic-release-action@v2
78+
with:
79+
semantic_version: 16
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
82+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.travis.yml

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

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# GitHub Languages Client
22

3-
[![Greenkeeper badge](https://badges.greenkeeper.io/jaebradley/github-languages-client.svg)](https://greenkeeper.io/)
4-
[![Build Status](https://travis-ci.org/jaebradley/github-languages-client.svg?branch=master)](https://travis-ci.org/jaebradley/github-languages-client)
3+
![GitHub Languages Client](https://github.com/jaebradley/github-languages-client/workflows/GitHub%20Languages%20Client/badge.svg)
54
[![codecov](https://codecov.io/gh/jaebradley/github-languages-client/branch/master/graph/badge.svg)](https://codecov.io/gh/jaebradley/github-languages-client)
65
[![npm](https://img.shields.io/npm/v/github-languages-client.svg)](https://www.npmjs.com/package/github-languages-client)
76
![npm bundle size](https://img.shields.io/bundlephobia/minzip/github-languages-client)

0 commit comments

Comments
 (0)