oidc-client-rx/.github/workflows/build.yml
2025-02-06 04:34:59 +08:00

59 lines
1.4 KiB
YAML

name: Build, Lint & Test Lib
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
workflow_dispatch:
jobs:
build_job:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build, Lint and Test Library
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node and Install Dependencies
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Linting Library
run: npm run lint
- name: Testing Frontend
run: npm run test-ci
- name: 'Report Coverage'
if: (github.event_name == 'pull_request' && github.event.action != 'closed')
uses: davelosert/vitest-coverage-report-action@v2
- name: Building Frontend
run: npm run build
- name: Show files
run: ls
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: oidc_client_rx_artifact
path: dist