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

Travis to workflows #200

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: build
on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn install
- name: build
run: yarn build
- name: lint
if: ${{ always() }}
run: yarn lint
- name: test
if: ${{ always() }}
run: yarn test
- name: Slack notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() }}
env:
SLACK_USERNAME: GitHub Actions - ${{ github.repository }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_FOOTER: 'Generated by a failed Github action in ${{ github.repository }} for job: ${{ github.job }}'
32 changes: 32 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: coverage
on:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js lts/*
uses: actions/setup-node@v2
with:
node-version: lts/*
cache: yarn
- run: yarn install
- name: test
id: test
if: ${{ always() }}
run: yarn test
- name: Publish code coverage
if: ${{ steps.test.outcome == 'success' }}
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} # Needs to be set.
- name: Slack notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() }}
env:
SLACK_USERNAME: GitHub Actions - ${{ github.repository }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_FOOTER: 'Generated by a failed Github action in ${{ github.repository }} for job: ${{ github.job }}'
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: release
on:
push:
branches:
- master

jobs:
release:
env:
CI: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js lts/*
uses: actions/setup-node@v2
with:
node-version: lts/*
cache: yarn
- run: yarn install
- name: build
run: yarn build
- name: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn semantic-release
- name: Slack notification
uses: rtCamp/action-slack-notify@v2
if: ${{ failure() }}
env:
SLACK_USERNAME: GitHub Actions - ${{ github.repository }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_FOOTER: 'Generated by a failed Github action in ${{ github.repository }} for job: ${{ github.job }}'
58 changes: 0 additions & 58 deletions .travis.yml

This file was deleted.