mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-03-01 12:44:28 +00:00
89 lines
1.9 KiB
YAML
89 lines
1.9 KiB
YAML
name: UI Compatibility
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- 'packages/ui/**'
|
|
pull_request:
|
|
branches: [master]
|
|
paths:
|
|
- 'packages/ui/**'
|
|
|
|
jobs:
|
|
build-library:
|
|
name: Build Library
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: packages/ui
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: 'packages/ui/.tool-versions'
|
|
cache: 'npm'
|
|
cache-dependency-path: packages/ui/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build library
|
|
run: npm run build
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ui-dist
|
|
path: packages/ui/dist/
|
|
retention-days: 1
|
|
|
|
test-compatibility:
|
|
name: Test ${{ matrix.example }}
|
|
needs: build-library
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
example:
|
|
- vue3-tailwind
|
|
- vue3-css
|
|
- vue2-tailwind
|
|
- vue2-css
|
|
defaults:
|
|
run:
|
|
working-directory: packages/ui/examples/${{ matrix.example }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download build artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ui-dist
|
|
path: packages/ui/dist/
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: 'packages/ui/.tool-versions'
|
|
cache: 'npm'
|
|
cache-dependency-path: packages/ui/examples/${{ matrix.example }}/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Run tests
|
|
run: npm test
|
|
|
|
- name: Build example app
|
|
run: npm run build
|