mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-01-20 07:12:58 -05:00
feat: frontend unit tests
This commit is contained in:
42
.github/workflows/frontend-build-and-test.yml
vendored
Normal file
42
.github/workflows/frontend-build-and-test.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Frontend build and test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node: [20]
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: '${{ matrix.os }} - node v${{ matrix.node }}'
|
||||
permissions:
|
||||
contents: read
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./frontend
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build script
|
||||
run: npm run dist
|
||||
|
||||
- name: Test script
|
||||
run: npm run test
|
||||
Reference in New Issue
Block a user