Skip to content

Commit 7cda0b7

Browse files
authored
Add GitHub actions (#181)
* Add GitHub actions * Fix badges * Fix badges 2 * add CODECOV_REPOSITORY_TOKEN
1 parent 52a4579 commit 7cda0b7

File tree

4 files changed

+56
-17
lines changed

4 files changed

+56
-17
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- '**'
9+
jobs:
10+
test:
11+
runs-on: ubuntu-18.04
12+
timeout-minutes: 30
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: '10.14'
18+
- name: Cache Node.js modules
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.os }}-node-
25+
- run: npm ci
26+
- run: npm run build
27+
- run: npm run test
28+
- run: ./node_modules/.bin/codecov -t ${{secrets.CODECOV_REPOSITORY_TOKEN}}

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: release
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
publish-npm:
7+
runs-on: ubuntu-18.04
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v1
11+
with:
12+
node-version: '10.14'
13+
registry-url: https://registry.npmjs.org/
14+
- name: Cache Node.js modules
15+
uses: actions/cache@v2
16+
with:
17+
path: ~/.npm
18+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
19+
restore-keys: |
20+
${{ runner.os }}-node-
21+
- run: npm ci
22+
- run: npm publish
23+
env:
24+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.travis.yml

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

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# parse-server-push-adapter
22

3-
[![Build
4-
Status](https://travis-ci.org/parse-community/parse-server-push-adapter.svg?branch=master)](https://travis-ci.org/parse-community/parse-server-push-adapter)
5-
[![codecov.io](https://codecov.io/github/parse-community/parse-server-push-adapter/coverage.svg?branch=master)](https://codecov.io/github/parse-community/parse-server-push-adapter?branch=master)
63
[![NPM Version](https://img.shields.io/npm/v/@parse/push-adapter.svg?style=flat-square)](https://www.npmjs.com/package/@parse/push-adapter)
4+
[![codecov.io](https://codecov.io/github/parse-community/parse-server-push-adapter/coverage.svg?branch=master)](https://codecov.io/github/parse-community/parse-server-push-adapter?branch=master)
5+
<a href="https://github.com/parse-community/parse-server-push-adapter/actions?query=workflow%3Aci+branch%3Amaster">
6+
<img alt="Build status" src="https://github.com/parse-community/parse-server-push-adapter/workflows/ci/badge.svg?branch=master">
7+
</a>
78

89
Official Push adapter for parse-server
910

0 commit comments

Comments
 (0)