Skip to content

Merge pull request #1107 from jobara/FLUID-6781 #355

Merge pull request #1107 from jobara/FLUID-6781

Merge pull request #1107 from jobara/FLUID-6781 #355

Workflow file for this run

name: Automated tests
on:
push:
paths:
- '.nycrc'
- 'package.json'
- 'buildModules.js'
- 'src/**/*.html'
- 'src/**/*.js'
- 'src/**/*.json'
- 'tests/**/*.html'
- 'tests/**/*.js'
- 'tests/**/*.json'
pull_request:
paths:
- '.nycrc'
- 'package.json'
- 'buildModules.js'
- 'src/**/*.html'
- 'src/**/*.js'
- 'src/**/*.json'
- 'tests/**/*.html'
- 'tests/**/*.js'
- 'tests/**/*.json'
defaults:
run:
shell: bash
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
node-version: [18.x, 20.x, 22.x]
env:
HEADLESS: true
steps:
- name: Prepare git
run: git config --global core.autocrlf false
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Node.js dependencies
run: npm install
- name: Run browser tests
run: npm run test:browser
- name: Run Node.js tests
run: npm run test:node
- name: Update code coverage
run: npm run posttest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./reports/coverage-final.json
flags: unit-tests