Avoid running golangci-lint on installed packages #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint-and-test | |
on: | |
- push | |
- pull_request | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
lintAndtestBackend: | |
name: lint and test backend | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21.4 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
only-new-issues: true | |
args: --timeout 5m0s | |
- name: Run Go tests | |
run: go test ./pkg/... | |
lintAndTestFrontEnd: | |
name: lint and test frontend | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: | | |
- recursive: true | |
- name: Run ESLint | |
run: pnpm eslint . --ext .js,.vue,.ts | |
- name: Run VueTSC | |
run: pnpm vue-tsc --noEmit | |
- name: Run Prettier | |
run: pnpm prettier --check . --log-level warn | |
- name: Run tests | |
run: pnpm test |