mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2026-10-28 09:44:55 +00:00
70 lines
1.4 KiB
YAML
Vendored
70 lines
1.4 KiB
YAML
Vendored
name: pr
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
checks:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
check:
|
|
# - eslint
|
|
- prettier
|
|
- typescript
|
|
- vitest
|
|
- build
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: "1.4.2"
|
|
|
|
- uses: actions/cache@v6
|
|
with:
|
|
path: |
|
|
node_modules
|
|
~/.bun/install/cache
|
|
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
|
|
|
|
- run: bun install
|
|
|
|
# - 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: templates
|