177 lines
4.6 KiB
YAML
177 lines
4.6 KiB
YAML
name: packages/stl - next/required
|
|
|
|
on:
|
|
push:
|
|
branches: [next]
|
|
paths:
|
|
- 'packages/stl/**'
|
|
- '.github/workflows/packages-stl-next-required.yml'
|
|
- 'pnpm-lock.yaml'
|
|
|
|
concurrency:
|
|
group: ci-stl-${{ github.ref_name }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
|
|
jobs:
|
|
setup-stage:
|
|
name: Setup - Stage
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
cache-hit: ${{ steps.cache-pnpm-store.outputs.cache-hit }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9.12.3
|
|
|
|
- name: Setup Node.js with pnpm cache
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'pnpm'
|
|
|
|
- name: Cache pnpm store
|
|
id: cache-pnpm-store
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.pnpm-store
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
build-configs:
|
|
name: Build - Configs
|
|
needs: setup-stage
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9.12.3
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'pnpm'
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Build Rsbuild config
|
|
run: pnpm --filter @ermnvldmr/rsbuild-config build
|
|
- name: Upload Config Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: rsbuild-config-dist
|
|
path: packages/rsbuild-config/dist
|
|
retention-days: 1
|
|
|
|
lint-stl:
|
|
name: Lint - STL
|
|
needs: build-configs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9.12.3
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'pnpm'
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Config Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: rsbuild-config-dist
|
|
path: packages/rsbuild-config/dist
|
|
- name: Lint STL package
|
|
run: pnpm --filter @ermnvldmr/stl lint
|
|
|
|
typecheck-stl:
|
|
name: Typecheck - STL
|
|
needs: build-configs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9.12.3
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'pnpm'
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Config Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: rsbuild-config-dist
|
|
path: packages/rsbuild-config/dist
|
|
- name: Typecheck STL package
|
|
run: pnpm --filter @ermnvldmr/stl typecheck
|
|
|
|
test-stl:
|
|
name: Test - STL
|
|
needs: build-configs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9.12.3
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'pnpm'
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Config Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: rsbuild-config-dist
|
|
path: packages/rsbuild-config/dist
|
|
- name: Test STL package
|
|
run: pnpm --filter @ermnvldmr/stl test:coverage
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
files: ./packages/stl/coverage/lcov.info
|
|
flags: stl
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
build-stl:
|
|
name: Build - STL
|
|
needs: build-configs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9.12.3
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'pnpm'
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Download Config Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: rsbuild-config-dist
|
|
path: packages/rsbuild-config/dist
|
|
- name: Build STL package
|
|
run: pnpm --filter @ermnvldmr/stl build
|