-
Notifications
You must be signed in to change notification settings - Fork 17
54 lines (54 loc) · 1.47 KB
/
lint-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23.1
- name: Create dummy file in resources
run: mkdir cmd/frontend/resources && touch cmd/frontend/resources/make-typecheck-happy.txt
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
only-new-issues: true
args: --timeout 5m0s
- name: Run Go tests
run: go test ./pkg/...
- uses: ./.github/send-notification-action
if: ${{ failure() }}
with:
secret: ${{ secrets.SLACK_WEBHOOK_URL }}
lintAndTestFrontEnd:
name: lint and test frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
run_install: |
- recursive: true
- name: Test build
run: pnpm build
- name: Run ESLint
run: pnpm eslint
- name: Run VueTSC
run: pnpm vue-tsc
- name: Run Prettier
run: pnpm prettier --check . --log-level warn
- name: Run tests
run: pnpm test
- uses: ./.github/send-notification-action
if: ${{ failure() }}
with:
secret: ${{ secrets.SLACK_WEBHOOK_URL }}