Skip to content

Commit

Permalink
Merge pull request #13 from betrybe/learn-6991
Browse files Browse the repository at this point in the history
feat: adiciona github summary com mais detalhe na execução do ESLint
  • Loading branch information
johnnytaira authored Jan 16, 2023
2 parents a987a82 + af0e465 commit e7ada93
Show file tree
Hide file tree
Showing 4 changed files with 3,688 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.3.0
- run: npm ci
- run: npm test
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ const run = async () => {

process.exit(status);
} catch (error) {
core.setFailed(error.message);
if (error.message.match(/Unexpected end of JSON input.*/)) {
core.summary
.addHeading('❌ Erro ao rodar o ESLint')
.addRaw('Remova o arquivo `package-lock.json` e tente rodar novamente o comando `npm install`. Se o erro persistir, contate o time Trybe')
.write();
} else {
core.setFailed(error.message);
}
}
};

Expand Down
Loading

0 comments on commit e7ada93

Please sign in to comment.