Skip to content

Commit c339aa0

Browse files
authored
Add GitHub Actions (#21)
* Add GitHub Actions * Fix main branch name on badges * Fix npm badge
1 parent fce2bf8 commit c339aa0

File tree

4 files changed

+59
-12
lines changed

4 files changed

+59
-12
lines changed

.github/workflows/ci.yml

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

.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 & 10 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# parse-server-fs-adapter
2-
[![Build Status](https://travis-ci.org/parse-community/parse-server-fs-adapter.svg?branch=master)](https://travis-ci.org/parse-community/parse-server-fs-adapter)
2+
<a href="https://www.npmjs.com/package/@parse/fs-files-adapter"><img alt="npm version" src="https://img.shields.io/npm/v/@parse/fs-files-adapter.svg?style=flat"></a>
33
[![codecov.io](https://codecov.io/github/parse-community/parse-server-fs-adapter/coverage.svg?branch=master)](https://codecov.io/github/parse-community/parse-server-fs-adapter?branch=master)
4-
4+
<a href="https://github.com/parse-community/parse-server-fs-adapter/actions?query=workflow%3Aci+branch%3Amain">
5+
<img alt="Build status" src="https://github.com/parse-community/parse-server-fs-adapter/workflows/ci/badge.svg?branch=main">
6+
</a>
57
parse-server file system storage adapter.
68

79

0 commit comments

Comments
 (0)