2023-04-16 23:30:56 +02:00
|
|
|
name: Javascript Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'web/**'
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'web/**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jest-run:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- id: skip_check
|
|
|
|
uses: fkirc/skip-duplicate-actions@v5
|
|
|
|
with:
|
|
|
|
concurrent_skipping: 'same_content_newer'
|
|
|
|
|
|
|
|
- name: Checkout
|
2023-10-07 22:52:25 +02:00
|
|
|
uses: actions/checkout@v4
|
2023-04-16 23:30:56 +02:00
|
|
|
|
2023-10-29 01:16:20 +02:00
|
|
|
- uses: actions/setup-node@v4
|
2023-04-16 23:30:56 +02:00
|
|
|
with:
|
|
|
|
node-version: 18.9.0
|
|
|
|
|
|
|
|
- name: Cache node modules
|
|
|
|
uses: actions/cache@v3
|
|
|
|
env:
|
|
|
|
cache-name: cache-node-modules-javascript-tests
|
|
|
|
with:
|
|
|
|
path: ~/.npm
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('web/package-lock.json') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
|
|
${{ runner.os }}-build-
|
|
|
|
${{ runner.os }}-
|
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
working-directory: ./web
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
working-directory: ./web
|
|
|
|
run: npm test
|