Skip to content

Changed "loading" card #622

Changed "loading" card

Changed "loading" card #622

Workflow file for this run

name: 'GADS Tests'
on: [ 'push', 'pull_request' ]
jobs:
unit_tests:
name: 'Unit Tests'
runs-on: 'ubuntu-22.04'
timeout-minutes: 30
steps:
- name: 'Check out the GADS repository'
uses: 'actions/checkout@v3'
- name: 'Install Non-CPAN 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
- name: 'Build cpanfile'
run: perl bin/output_cpanfile > cpanfile
- name: 'Install CPAN dependencies'
uses: 'perl-actions/install-with-cpanm@v1'
with:
cpanfile: 'cpanfile'
- name: 'Run the unit tests'
run: |
prove -lrs -j4 t
webdriver_tests:
name: 'Webdriver Tests for ${{ matrix.browser.name }}'
runs-on: '${{ matrix.browser.os }}'
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
browser:
- name: 'Chromium'
command: 'chromedriver --port=4444 &'
os: 'ubuntu-22.04'
- name: 'Firefox'
command: 'MOZ_HEADLESS=1 geckodriver --log warn &'
os: 'ubuntu-20.04'
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgrespassword
POSTGRES_DB: postgres
ports:
- 5432:5432
env:
GADS_USERNAME: '[email protected]'
GADS_PASSWORD: 'xyz123'
steps:
- name: 'Check out the GADS code'
uses: 'actions/checkout@v3'
- name: 'Install Non-CPAN dependencies'
run: |
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
- name: 'Build cpanfile'
run: perl bin/output_cpanfile > cpanfile
- name: 'Install CPAN dependencies'
uses: 'perl-actions/install-with-cpanm@v1'
with:
cpanfile: 'cpanfile'
- name: 'Install Webdriver CPAN dependencies'
uses: 'perl-actions/install-with-cpanm@v1'
with:
install: |
Test2::Tools::Compare
WebDriver::Tiny
- name: 'Set up credentials for psql'
# See https://wiki.postgresql.org/wiki/Pgpass
run: |
echo '*:*:*:postgres:postgrespassword' > ~/.pgpass
chmod 600 ~/.pgpass
- name: 'Start the application'
env:
DANCER_CONFDIR: 'webdriver'
PGDATABASE: 'postgres'
PGHOST: 'localhost'
PGUSER: 'postgres'
run: |
./bin/setup_database
perl bin/app.pl &
- name: 'Run the Webdriver implementation'
run: '${{ matrix.browser.command }}'
- name: 'Run the Webdriver tests'
# TODO: Delete the line below and uncomment the line beneath that
run: prove -lmrsv webdriver/t/login.t
#run: prove -lmrsv webdriver/t