Skip to content

Commit

Permalink
chore: move danger to GH action
Browse files Browse the repository at this point in the history
also convert dangerfile to typescript
  • Loading branch information
G-Rath committed Oct 27, 2019
1 parent 6de136a commit 24ddc1b
Show file tree
Hide file tree
Showing 8 changed files with 478 additions and 75 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Expand Up @@ -63,7 +63,7 @@ module.exports = {
globals,
},
{
files: 'src/**/*',
files: ['src/**/*', 'dangerfile.ts'],
parserOptions: {
sourceType: 'module',
},
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/commitlint.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,24 @@
name: Lint
on: [pull_request]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: wagoid/commitlint-github-action@v1.2.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: install
run: yarn
- name: Danger
run: yarn danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions .github/workflows/nodejs.yml
Expand Up @@ -50,8 +50,7 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
- name: install
Expand Down
7 changes: 0 additions & 7 deletions .travis.yml
Expand Up @@ -12,13 +12,6 @@ before_script: greenkeeper-lockfile-update
script:
- yarn test --coverage --maxWorkers 2
after_script: greenkeeper-lockfile-upload
jobs:
include:
- stage: danger
node_js: lts/*
os: linux
script:
- npx -p danger@^3 danger ci
cache:
yarn: true
branches:
Expand Down
5 changes: 1 addition & 4 deletions dangerfile.js → dangerfile.ts
@@ -1,7 +1,4 @@
'use strict';

// eslint-disable-next-line node/no-missing-require
const { danger, fail } = require('danger');
import { danger } from 'danger';

// Ensure that people include a description on their PRs
if (danger.github.pr.body.length === 0) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -54,6 +54,7 @@
"@typescript-eslint/parser": "^2.5.0",
"babel-jest": "^24.9.0",
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
"danger": "^9.2.2",
"eslint": "^5.1.0 || ^6.0.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-eslint-plugin": "^2.0.0",
Expand Down

0 comments on commit 24ddc1b

Please sign in to comment.