Skip to content

Update key-brightspace.txt #26

Update key-brightspace.txt

Update key-brightspace.txt #26

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:
# Using v1 (rather than v2) through-out this workflow due to issue:
# https://github.com/actions/checkout/issues/237
- uses: actions/checkout@v1
- name: NPM Cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: SBT Cache
uses: actions/cache@v2
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
restore-keys: |
${{ runner.os }}-sbt-
- name: Ivy Cache
uses: actions/cache@v2
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-ivy-${{ hashFiles('**/build.sbt') }}
restore-keys: |
${{ runner.os }}-ivy-
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install node dependencies (core)
working-directory: Source/Plugins/Core/com.equella.core/js
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
- name: Run unit tests (java/scala)
run: |
./sbt test
- name: Run unit tests (javascript)
working-directory: Source/Plugins/Core/com.equella.core/js
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_import_export_tool:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- 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]
fail-fast: false
services:
postgres:
image: postgres:9.6
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
# Setup ffmpeg to act like libav-tools
sudo ln -s /usr/bin/ffmpeg /usr/bin/avconv
sudo ln -s /usr/bin/ffplay /usr/bin/avplay
sudo ln -s /usr/bin/ffprobe /usr/bin/avprobe
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/checkout@v1
- name: Download installer
uses: actions/download-artifact@v1
with:
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:9.6
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@v1
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
ffmpeg \
libimage-exiftool-perl
# Setup ffmpeg to act like libav-tools
sudo ln -s /usr/bin/ffmpeg /usr/bin/avconv
sudo ln -s /usr/bin/ffplay /usr/bin/avplay
sudo ln -s /usr/bin/ffprobe /usr/bin/avprobe
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Download installer
uses: actions/download-artifact@v1
with:
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: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- 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