Skip to content

Commit fe48ef3

Browse files
committed
ci: replace travis by github actions
1 parent 9b5aab6 commit fe48ef3

File tree

5 files changed

+83
-20
lines changed

5 files changed

+83
-20
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# For more information see: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: 'github-actions'
6+
directory: '/'
7+
schedule:
8+
interval: 'daily'
9+
10+
- package-ecosystem: 'npm'
11+
directory: '/'
12+
schedule:
13+
interval: 'daily'

.github/workflows/nodejs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
2+
3+
name: 'Node.js CI'
4+
5+
on:
6+
push:
7+
branches: [master]
8+
pull_request:
9+
branches: [master]
10+
11+
jobs:
12+
build:
13+
runs-on: 'ubuntu-latest'
14+
15+
strategy:
16+
matrix:
17+
node-version: [10.x, 12.x, 14.x]
18+
19+
steps:
20+
- uses: 'actions/checkout@v2'
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: 'actions/[email protected]'
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
27+
- name: 'Cache dependencies'
28+
uses: 'actions/cache@v2'
29+
with:
30+
path: |
31+
**/node_modules
32+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
33+
34+
- run: 'npm install'
35+
- run: 'npm run lint'
36+
- run: 'npm run build'
37+
- run: 'npm run cover'
38+
- run: 'nyc report --reporter=lcov > coverage.lcov && codecov'

.github/workflows/npm-publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
2+
3+
name: 'Node.js Package'
4+
5+
on:
6+
release:
7+
types: [created]
8+
9+
jobs:
10+
publish-npm:
11+
runs-on: 'ubuntu-latest'
12+
steps:
13+
- uses: 'actions/checkout@v2'
14+
15+
- name: 'Cache dependencies'
16+
uses: 'actions/cache@v2'
17+
with:
18+
path: |
19+
**/node_modules
20+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
21+
22+
- uses: 'actions/[email protected]'
23+
with:
24+
node-version: 14
25+
registry-url: 'https://registry.npmjs.org/'
26+
27+
- run: 'npm install'
28+
- run: 'npm run build'
29+
- run: 'npm publish'
30+
env:
31+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/RobinBuschmann/sequelize-typescript.svg?branch=master)](https://travis-ci.org/RobinBuschmann/sequelize-typescript)
1+
[![Build Status](https://github.com/Divlo/create-fullstack-app/workflows/Node.js%20CI/badge.svg)](https://github.com/RobinBuschmann/sequelize-typescript/actions?query=workflow%3A%22Node.js+CI%22)
22
[![codecov](https://codecov.io/gh/RobinBuschmann/sequelize-typescript/branch/master/graph/badge.svg)](https://codecov.io/gh/RobinBuschmann/sequelize-typescript)
33
[![NPM](https://img.shields.io/npm/v/sequelize-typescript.svg)](https://www.npmjs.com/package/sequelize-typescript)
44
[![Dependency Status](https://img.shields.io/david/RobinBuschmann/sequelize-typescript.svg)](https://www.npmjs.com/package/sequelize-typescript)

0 commit comments

Comments
 (0)