50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Testing package
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ['*']
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version: [16.x]
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js 16
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
cache: 'npm'
|
|
registry-url: https://registry.npmjs.org/
|
|
- run: npm ci --legacy-peer-deps
|
|
- run: npm test
|
|
cypress-run:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
# Install NPM dependencies, cache them correctly
|
|
# and run all Cypress tests
|
|
- name: Cypress install
|
|
run: npm install --legacy-peer-deps
|
|
- name: Cypress run
|
|
uses: cypress-io/github-action@v5 # use the explicit version number
|
|
with:
|
|
install: false
|
|
component: true
|
|
test-build-package:
|
|
needs: [ test, cypress-run ]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
registry-url: https://registry.npmjs.org/
|
|
- run: npm ci --legacy-peer-deps
|
|
- run: npm run build
|
|
env:
|
|
LIBRARY_NAME: "@aleleba/ro-ut-ui"
|
|
EXTERNAL_CSS: "true" |