diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index eb9bdaea..4d531b10 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -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 diff --git a/.madrun.mjs b/.madrun.mjs index 763eaf69..fedcce38 100644 --- a/.madrun.mjs +++ b/.madrun.mjs @@ -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'),