Skip to content

Commit

Permalink
ci: replace travis with GitHub Actions (#53)
Browse files Browse the repository at this point in the history
* ci: remove travis

* ci(actions): test workflow

* ci(actions): release workflow

* ci(actions): update-prettier workflow

* docs(README): build status badge
  • Loading branch information
gr2m authored Jul 16, 2020
1 parent 136ff78 commit d155315
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 30 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release
on:
push:
branches:
- master
- next
- beta
- "*.x" # maintenance releases

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test
on:
push:
branches:
- master
- "greenkeeper/**"
pull_request:
types: [opened, synchronize]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [10, 12, 14]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Install
run: npm ci
- name: Test
run: npm test
23 changes: 23 additions & 0 deletions .github/workflows/update-prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Update Prettier
on:
push:
branches:
- "greenkeeper/prettier-*"
jobs:
update_prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm run lint:fix
- uses: gr2m/create-or-update-pull-request-action@v1.x
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: "Prettier updated"
body: "An update to prettier required updates to your code."
branch: ${{ github.ref }}
commit-message: "style: prettier"
29 changes: 0 additions & 29 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
Expand Up @@ -3,7 +3,7 @@
> Get a user agent string in both browser and node
[![@latest](https://img.shields.io/npm/v/universal-user-agent.svg)](https://www.npmjs.com/package/universal-user-agent)
[![Build Status](https://travis-ci.com/gr2m/universal-user-agent.svg?branch=master)](https://travis-ci.com/gr2m/universal-user-agent)
[![Build Status](https://github.com/gr2m/universal-user-agent/workflows/Test/badge.svg)](https://github.com/gr2m/universal-user-agent/actions?query=workflow%3ATest+branch%3Amaster)
[![Greenkeeper](https://badges.greenkeeper.io/gr2m/universal-user-agent.svg)](https://greenkeeper.io/)

```js
Expand Down

0 comments on commit d155315

Please sign in to comment.