Repository navigation
86 lines (72 loc) · 1.96 KB
/
Copy pathreusable-verify.yml
File metadata and controls
86 lines (72 loc) · 1.96 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Verify
on:
workflow_call:
inputs:
ref:
description: Commit, branch or tag to verify.
required: true
type: string
permissions:
contents: read
jobs:
checks:
name: ${{ matrix.check }}
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
check:
# ESLint waits for typescript-eslint to support the installed TypeScript 7.
# - eslint
- prettier
- typescript
- vitest
- build
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.ref }}
persist-credentials: false
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.4.0"
- uses: actions/cache@v6
with:
path: ~/.bun/install/cache
key: bun-cache-v3-${{ runner.os }}-${{ hashFiles('package.json') }}
- run: bun install --frozen-lockfile
# - name: Lint
# if: matrix.check == 'eslint'
# run: bun lint
- name: Format check
if: matrix.check == 'prettier'
run: bun fmt --check
- name: Type check
if: matrix.check == 'typescript'
run: bun check
- name: Test
if: matrix.check == 'vitest'
run: bun vitest --run
- name: Build
id: build
if: matrix.check == 'build'
run: bun bundle
- name: Upload css assets
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v7
with:
name: themes
path: dist/*.css
- name: Upload templates assets
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v7
with:
name: templates
path: dist/forgejo/templates
- name: Upload JavaScript assets
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v7
with:
name: scripts
path: dist/forgejo/public/assets/js