Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
fix: migrate to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-sanare committed Jul 1, 2021
1 parent 4de84bf commit 203db47
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 18 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
install:
name: Install
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm i


validate:
name: Validate - Node v${{ matrix.node }}
runs-on: ubuntu-18.04
needs: install
strategy:
matrix:
node: [ 10, 11, 12, 14 ]

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Restore node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Linting
run: npm start lint
- name: Run Tests
run: npm start test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

release:
name: Release
runs-on: ubuntu-18.04
needs: [validate]
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Restore node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
# Release the Codes!!
- name: Release!
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm start semantic-release
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

0 comments on commit 203db47

Please sign in to comment.