Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(update): Added Job summary for lint.yml workflow #2755

Closed
wants to merge 7 commits into from
31 changes: 25 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,59 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Checkout
- name: Adding markdown
run: echo '### Lint TypeScript ✨' >> $GITHUB_STEP_SUMMARY

- name: Checkout
uses: actions/checkout@v3.3.0

- name: Setup Node
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.14.2
cache: yarn
cache-dependency-path: ./internal/lookout/ui/yarn.lock

- name: Check TypeScript formatting
- name: Check TypeScript formatting
run: |
yarn install --frozen-lockfile && yarn run fmt || exit 1
exit $(git status -s -uno | wc -l)
working-directory: ./internal/lookout/ui

- name: Generate list using Markdown
run: |
echo "- ✔️ Checked out the repository" >> $GITHUB_STEP_SUMMARY
echo "- ✔️ Set up Node.js with version 16.14.2 and cached Yarn dependencies" >> $GITHUB_STEP_SUMMARY
echo "- ✔️ Checked TypeScript formatting" >> $GITHUB_STEP_SUMMARY

go-lint:
name: Lint Go
runs-on: ubuntu-22.04

steps:
- name: Checkout
- name: Adding markdown
run: echo '### Lint Go ✨' >> $GITHUB_STEP_SUMMARY

- name: Checkout
uses: actions/checkout@v3.3.0

- name: Setup Golang with Cache
- name: Setup Golang with Cache
uses: magnetikonline/action-golang-cache@v4
with:
go-version: "1.20"

- name: Lint using golangci-lint
- name: Lint using golangci-lint
uses: golangci/golangci-lint-action@v3
with:
skip-pkg-cache: true
skip-build-cache: true
version: v1.52.2
only-new-issues: true
args: --timeout=10m --issues-exit-code=1 --sort-results ./...

- name: Generate list using Markdown
run: |
echo "- ✔️ Checked out the repository" >> $GITHUB_STEP_SUMMARY
echo "- ✔️ Set up Go with version 1.20 and cached dependencies" >> $GITHUB_STEP_SUMMARY
echo "- ✔️ Linted Go code using golangci-lint" >> $GITHUB_STEP_SUMMARY

Loading