Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/install.sh
Comment thread
droberts-ctrlo marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

apt-get update
apt-get install -y curl gpg
curl -o- https://debian.ctrlo.com/repos/apt/debian/whatever.gpg.key | gpg --dearmor -o /usr/share/keyrings/ctrlo-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/ctrlo-keyring.gpg] https://debian.ctrlo.com/repos/apt/debian/ bookworm main' | tee /etc/apt/sources.list.d/ctrlo.list
apt-get update
apt-get install -y libapache2-mod-fastcgi libapache2-mod-perl2 libconfig-inifiles-perl libcrypt-saltedhash-perl libcrypt-urandom-perl libdancer2-perl
apt-get install -y libdancer2-plugin-auth-extensible-provider-dbic-perl libdancer2-plugin-dbic-perl libdancer2-session-dbic-perl
apt-get install -y libdata-dump-streamer-perl libdata-visitor-perl libdatetime-format-mysql-perl libdbd-mysql-perl libdbix-class-migration-perl
apt-get install -y libdbix-class-perl libfcgi-perl libfile-copy-recursive-perl libio-all-perl liblog-report-lexicon-perl liblog-report-perl
apt-get install -y libmail-box-perl libmail-transport-perl libmath-random-isaac-xs-perl libmoox-singleton-perl libpod-parser-perl libregexp-common-perl
apt-get install -y libstring-camelcase-perl libtemplate-perl libtext-autoformat-perl libtext-csv-perl libyaml-libyaml-perl libdatetime-format-cldr-perl
apt-get install -y libtree-dagnode-perl libalgorithm-dependency-perl libdatetime-set-perl libdata-compare-perl libdatetime-event-random-perl
apt-get install -y libtext-csv-encoded-perl libhtml-fromtext-perl libhtml-scrubber-perl libdbd-pg-perl postgresql postgresql-contrib
apt-get install -y libdatetime-format-pg-perl libset-infinite-perl libtie-cache-perl libdbix-class-helpers-perl libmath-round-perl
apt-get install -y libmoox-types-mooselike-datetime-perl libdatetime-format-datemanip-perl libinline-lua-perl lua5.2 libctrlo-crypt-xkcdpassword-perl
apt-get install -y libfile-slurp-perl libfile-mimeinfo-perl liblist-compare-perl libnet-oauth2-authorizationserver-perl libfontconfig1
apt-get install -y libctrlo-pdf-perl libpdf-builder-perl fonts-liberation libdate-holidays-gb-perl libcgi-deurl-xs-perl libfile-bom-perl
apt-get install -y libdatetime-format-iso8601-perl liblog-log4perl-perl libwww-mechanize-chrome-perl chromium libfile-libmagic-perl libnet-saml2-perl
apt-get install -y liburl-encode-perl libtext-markdown-perl libtest-tempdir-tiny-perl libtest-mocktime-perl
31 changes: 14 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- master
- dev
- hotfix
paths-ignore:
- '*.md'
- VERSION
pull_request:
branches:
- master
Expand All @@ -19,24 +22,17 @@ jobs:
name: 'Unit Tests'
runs-on: 'ubuntu-22.04'
timeout-minutes: 30
container: debian:bookworm

steps:
- name: 'Check out the GADS repository'
uses: 'actions/checkout@v4'
- name: 'Install Non-CPAN dependencies'
- name: 'Install dependencies'
run: |
sudo apt-get install cpanminus liblua5.3-dev
# Avoid "Install CPAN dependencies" needing to compile so much
sudo apt-get install libdancer2-perl libdatetime-format-sqlite-perl libtest-most-perl libdatetime-set-perl libdbix-class-schema-loader-perl libtest-tempdir-tiny-perl
- name: 'Build cpanfile'
run: perl bin/output_cpanfile > cpanfile
- name: 'Install CPAN dependencies'
uses: 'perl-actions/install-with-cpanm@v1'
with:
cpanfile: 'cpanfile'
chmod +x ./.github/workflows/install.sh
./.github/workflows/install.sh
- name: 'Run the unit tests'
run: |
prove -lrs -j4 t
run: prove -lrs -j4 t

webdriver_tests:
name: 'Webdriver Tests for ${{ matrix.browser.name }}'
Expand Down Expand Up @@ -73,6 +69,7 @@ jobs:
uses: 'actions/checkout@v4'
- name: 'Install Non-CPAN dependencies'
run: |
sudo apt-get update
sudo apt-get install cpanminus liblua5.3-dev
# Avoid "Install CPAN dependencies" needing to compile so much
sudo apt-get install libdatetime-format-sqlite-perl libtest-most-perl libdatetime-set-perl libdbix-class-schema-loader-perl
Expand Down Expand Up @@ -106,7 +103,7 @@ jobs:
run: '${{ matrix.browser.command }}'
- name: 'Run the Webdriver tests'
run: prove -lmrsv webdriver/t

cypress_tests:
name: 'Cypress Tests for ${{ matrix.browser.name }}'
runs-on: '${{ matrix.browser.os }}'
Expand All @@ -118,7 +115,7 @@ jobs:
browser:
- name: 'chrome'
os: 'ubuntu-22.04'

services:
postgres:
image: postgres
Expand All @@ -138,6 +135,7 @@ jobs:
uses: 'actions/checkout@v4'
- name: 'Install Non-CPAN dependencies'
run: |
sudo apt-get update
sudo apt-get install cpanminus liblua5.3-dev gcc g++ libdatetime-format-sqlite-perl libtest-most-perl libdatetime-set-perl
sudo apt-get install libdbix-class-schema-loader-perl libmagic-dev postgresql-client libpng-dev libssl-dev libpq-dev
sudo apt-get install libjson-perl libsession-token-perl libnet-oauth2-authorizationserver-perl libtext-csv-encoded-perl
Expand Down Expand Up @@ -181,13 +179,13 @@ jobs:
perl bin/app.pl &
- name: 'Run the Cypress tests'
run: yarn cypress run --browser ${{ matrix.browser.name }}

js_tests:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
node-version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -197,6 +195,5 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npx update-browserslist-db@latest
- run: yarn
- run: yarn jest --passWithNoTests