chore(github-actions) add ability to autofix lint

This commit is contained in:
coderaiser 2021-02-03 14:03:50 +02:00
parent 60607184d4
commit fce254f724
2 changed files with 32 additions and 15 deletions

View file

@ -5,6 +5,8 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
NAME: putout
steps:
- uses: actions/checkout@master
@ -13,23 +15,37 @@ jobs:
with:
node-version: 14.x
- name: install
run: |
- name: Install Redrun
run:
npm i redrun -g
- name: Install
run:
npm install
- name: lint
run: |
npm run lint
- name: Lint
run:
redrun fix:lint
- name: Commit fixes
uses: EndBug/add-and-commit@v7
with:
message: 'chore(${{ env.NAME }}) lint using actions'
- name: build
run: |
npm run build
npm test
- name: Build
run:
redrun build
- name: test
run: |
npm test
- name: Test
run:
redrun test
- name: Coverage
run:
redrun coverage coverage:report
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: coverage
run: |
npm run coverage

View file

@ -28,6 +28,7 @@ export default {
'wisdom': () => run(['lint:all', 'build', 'test']),
'wisdom:type': () => 'bin/release.mjs',
'coverage': async () => [testEnv, `nyc ${await cutEnv('test')}`],
'coverage:report': () => 'nyc report --reporter=lcov',
'report': () => 'nyc report --reporter=text-lcov | coveralls',
'6to5': () => 'webpack --progress',
'6to5:client': () => run('6to5', '--mode production'),