mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
[GithubActions][Updater] Add updater unit tests to github actions
This commit is contained in:
committed by
Aaro Koivukangas
parent
f5229ee678
commit
ca54fba5be
@@ -0,0 +1,18 @@
|
|||||||
|
name: 'Run updater unit tests'
|
||||||
|
description: 'Runs unit tests in sis-updater-worker'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Install node-24
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: npm ci --prefix ./updater/sis-updater-worker
|
||||||
|
|
||||||
|
- name: Run updater unit tests
|
||||||
|
shell: bash
|
||||||
|
run: npm run test:unit --prefix ./updater/sis-updater-worker
|
||||||
@@ -95,6 +95,7 @@ jobs:
|
|||||||
- build_frontend
|
- build_frontend
|
||||||
- lint_packages
|
- lint_packages
|
||||||
- test_unit
|
- test_unit
|
||||||
|
- test_updater_unit
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
@@ -130,6 +131,7 @@ jobs:
|
|||||||
- build_frontend
|
- build_frontend
|
||||||
- lint_packages
|
- lint_packages
|
||||||
- test_unit
|
- test_unit
|
||||||
|
- test_updater_unit
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
@@ -166,6 +168,7 @@ jobs:
|
|||||||
- build_frontend
|
- build_frontend
|
||||||
- lint_packages
|
- lint_packages
|
||||||
- test_unit
|
- test_unit
|
||||||
|
- test_updater_unit
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v7
|
- uses: actions/checkout@v7
|
||||||
@@ -315,6 +318,19 @@ jobs:
|
|||||||
- name: Run unit tests (frontend and backend)
|
- name: Run unit tests (frontend and backend)
|
||||||
uses: ./.github/actions/test/unit
|
uses: ./.github/actions/test/unit
|
||||||
|
|
||||||
|
# === Updater unit testing ===
|
||||||
|
test_updater_unit:
|
||||||
|
name: 'Run updater unit tests'
|
||||||
|
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
|
||||||
|
timeout-minutes: 15
|
||||||
|
if: |
|
||||||
|
!cancelled() && !failure()
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- name: Run updater unit tests
|
||||||
|
uses: ./.github/actions/test/updater-unit
|
||||||
|
|
||||||
# === Frontend component testing ===
|
# === Frontend component testing ===
|
||||||
test_components:
|
test_components:
|
||||||
name: 'Test frontend components'
|
name: 'Test frontend components'
|
||||||
|
|||||||
@@ -23,6 +23,15 @@ jobs:
|
|||||||
- name: 'Run linter'
|
- name: 'Run linter'
|
||||||
run: npm run lint -- updater
|
run: npm run lint -- updater
|
||||||
|
|
||||||
|
test_updater_unit:
|
||||||
|
name: 'Run updater unit tests'
|
||||||
|
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
|
||||||
|
timeout-minutes: 15
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- name: Run updater unit tests
|
||||||
|
uses: ./.github/actions/test/updater-unit
|
||||||
|
|
||||||
build_worker:
|
build_worker:
|
||||||
name: 'Build Updater worker'
|
name: 'Build Updater worker'
|
||||||
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
|
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
|
||||||
@@ -79,6 +88,7 @@ jobs:
|
|||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
needs:
|
needs:
|
||||||
- lint_scheduler_and_worker
|
- lint_scheduler_and_worker
|
||||||
|
- test_updater_unit
|
||||||
- build_worker
|
- build_worker
|
||||||
- build_scheduler
|
- build_scheduler
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user