Skip to content

chore(deps): update definitelytyped #13644

chore(deps): update definitelytyped

chore(deps): update definitelytyped #13644

Workflow file for this run

name: openEQUELLA CI
on:
push:
branches:
- master
- develop
- release/**
- stable-*
- component/**
tags:
- "**"
pull_request:
branches:
- master
- develop
- release/**
- stable-*
- component/**
jobs:
build_and_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: NPM Cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: SBT Cache
uses: actions/cache@v3
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
restore-keys: |
${{ runner.os }}-sbt-
- name: Ivy Cache
uses: actions/cache@v3
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: |
${{ runner.os }}-ivy-
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
- name: Install node dependencies (oeq-rest-api)
working-directory: oeq-ts-rest-api
run: |
npm ci
- name: Build oEQ REST module (oeq-rest-api)
working-directory: oeq-ts-rest-api
run: |
npm run build
- name: Install node dependencies (core)
working-directory: react-front-end
run: |
npm ci
- name: Install node dependencies (IntegTester)
working-directory: autotest/IntegTester/ps
run: |
npm ci
- name: Install node dependencies (root)
run: |
npm ci
- name: Run checks
run: |
npm run check
./sbt headerCheck checkJavaCodeStyle
# oeq-ts-rest-api has its own ESLint checks seeing the ultimate plan
# is that it's moved to its own stand-alone repo. But so here we need
# to explicitly run them.
- name: Run checks (oeq-ts-rest-api)
working-directory: oeq-ts-rest-api
run: |
npm run lint
- name: Run unit tests (java/scala)
run: |
./sbt test
- name: Run unit tests (javascript)
working-directory: react-front-end
run: |
npm cit
- name: Run unit tests (javascript - legacy)
working-directory: Source/Plugins/Core/com.equella.core/test/javascript
run: |
npm cit
- name: Build primary artefacts
run: |
./sbt installerZip writeLanguagePack writeScriptingJavadoc
- name: Package artefacts
# We use --transform below to strip out the path for the files in the tar file
run: |
tar cvf artefacts.tar --transform='s/.\+\///' \
Installer/target/equella-installer*.zip \
Source/Server/equellaserver/target/tle-upgrade*.zip \
target/*.zip
- name: Save primary artefacts
uses: actions/[email protected]
with:
name: Artefacts
path: artefacts.tar
build_storybook:
runs-on: ubuntu-latest
steps:
# Using v1 (rather than v2) through-out this workflow due to issue:
# https://github.com/actions/checkout/issues/237
- uses: actions/checkout@v4
- name: NPM Cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm.storybook-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm.storybook-
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install node dependencies (oeq-rest-api)
working-directory: oeq-ts-rest-api
run: |
npm ci
- name: Build oEQ REST module (oeq-rest-api)
working-directory: oeq-ts-rest-api
run: |
npm run build
- name: Install node dependencies (core)
working-directory: react-front-end
run: |
npm ci
- name: Generate Static Storybook instance
working-directory: react-front-end
run: |
npm run build-storybook
- name: Package Static Storybook instance
working-directory: react-front-end
run: |
tar cvf storybook.tar storybook-static
- name: Save Static Storybook instance
uses: actions/[email protected]
with:
name: Storybook
path: react-front-end/storybook.tar
build_import_export_tool:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
- name: Build
working-directory: import-export-tool
run: |
./gradlew build
- name: Save primary artefacts
uses: actions/[email protected]
with:
name: ImportExportTools
path: import-export-tool/build/libs/
functional_testing:
needs: build_and_check
runs-on: ubuntu-latest
strategy:
matrix:
newui: [true, false]
pgsql-image: [latest, 12]
exclude:
- newui: false
pgsql-image: latest
fail-fast: false
services:
postgres:
image: postgres:${{ matrix.pgsql-image }}
env:
POSTGRES_USER: equellatests
POSTGRES_PASSWORD: password
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
AUTOTEST_CONFIG: autotest/github-actions.conf
EQ_EXIFTOOL_PATH: /usr/bin/exiftool
OLD_TEST_NEWUI: ${{ matrix.newui }}
steps:
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
ffmpeg \
libimage-exiftool-perl
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Download Artefacts
uses: actions/download-artifact@v3
with:
path: Artefacts
name: Artefacts
- name: Extract installer from build
env:
DOWNLOAD_DIR: Artefacts
INSTALLER_DIR: Installer/target
run: |
tar --directory $DOWNLOAD_DIR -xvf $DOWNLOAD_DIR/artefacts.tar
mkdir -p $INSTALLER_DIR
mv -v $DOWNLOAD_DIR/equella-installer*.zip $INSTALLER_DIR
- name: Setup for tests
run: |
./sbt -jvm-opts autotest/.jvmopts "project autotest" \
installEquella startEquella configureInstall setupForTests
- name: Run Scalacheck tests
# We only need to run these once, so we focus on the New UI
if: matrix.newui
run: |
./sbt -jvm-opts autotest/.jvmopts "project autotest" \
Tests/test Tests/Serial/test dumpCoverage
- name: Save Scalacheck results
if: matrix.newui && failure()
uses: actions/[email protected]
with:
name: ScalacheckReports
path: autotest/Tests/target/test-reports
- name: Run TestNG tests
run: |
./sbt -jvm-opts autotest/.jvmopts "project autotest" \
OldTests/test dumpCoverage
- name: Save TestNG Reports
if: failure()
uses: actions/[email protected]
with:
name: TestNGReports-new-${{ matrix.newui }}
path: autotest/OldTests/target/testng
- name: Save oEQ Logs
if: failure()
uses: actions/[email protected]
with:
name: oEQLogs-new-${{ matrix.newui }}
path: autotest/equella-install/logs
- name: Save Screenshots
if: failure()
uses: actions/[email protected]
with:
name: Screenshots-new-${{ matrix.newui }}
path: autotest/Tests/target/test-reports/screenshots
- name: Generate coverage report
run: |
./sbt -jvm-opts autotest/.jvmopts "project autotest" \
coverageReport
# To save significant time on file upload, we first tar up the directory
# as it contains > 10k files and the artefact upload was taking almost
# 1hr.
- name: Package Coverage Report
run: |
tar cvf coverage_report.tar autotest/target/coverage-report/
- name: Save Coverage Report
uses: actions/[email protected]
with:
name: CoverageReport-newui-${{ matrix.newui }}
path: coverage_report.tar
rest-module-testing:
needs: build_and_check
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: equellatests
POSTGRES_PASSWORD: password
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
AUTOTEST_CONFIG: autotest/github-actions.conf
steps:
- uses: actions/checkout@v4
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
ffmpeg \
libimage-exiftool-perl
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Download installer
uses: actions/download-artifact@v3
with:
path: Artefacts
name: Artefacts
- name: Extract installer from build
env:
DOWNLOAD_DIR: Artefacts
INSTALLER_DIR: Installer/target
run: |
tar --directory $DOWNLOAD_DIR -xvf $DOWNLOAD_DIR/artefacts.tar
mkdir -p $INSTALLER_DIR
mv -v $DOWNLOAD_DIR/equella-installer*.zip $INSTALLER_DIR
- name: Install openEquella
run: |
./sbt -jvm-opts autotest/.jvmopts "project autotest" \
installEquella startEquella configureInstall setupForTests
- name: Run tests
working-directory: oeq-ts-rest-api
run: |
npm cit
- name: Stop oEQ
if: failure()
run: |
./sbt -jvm-opts autotest/.jvmopts "project autotest" \
stopEquella
- name: Save oEQ logs for REST Module
if: failure()
uses: actions/[email protected]
with:
name: oEQ-logs-rest-module
path: autotest/equella-install/logs