Skip to content

Commit

Permalink
Tidy test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Oct 4, 2022
1 parent c4d6458 commit 3c5a799
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/perltest.yml
Expand Up @@ -19,6 +19,7 @@ jobs:
SUCC_DB_HOST: 127.0.0.1
SUCC_DB_NAME: succession
SUCC_DB_PASS: strongpassword
SUCC_DB_PORT: ${{ job.services.mariadb.ports[3306] }}
PERL5LIB: Succession/lib:$PERL5LIB
runs-on: ${{ matrix.os }}
services:
Expand Down Expand Up @@ -47,23 +48,15 @@ jobs:
- name: Perl version
run: perl -V
- name: Setup database
env:
PORT: ${{ job.services.mariadb.ports[3306] }}
run: mysql -u root -psekrit -h 127.0.0.1 -P"$PORT" -D $SUCC_DB_NAME < data/succession_dump.sql
run: mysql -u root -psekrit -h 127.0.0.1 -P"SUCC_DB_PORT" -D $SUCC_DB_NAME < data/succession_dump.sql
- name: Wait for database
env:
PORT: ${{ job.services.mariadb.ports[3306] }}
run: |
while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do
while ! mysqladmin ping -h"127.0.0.1" -P"$SUCC_DB_PORT" --silent; do
sleep 1
done
- name: Check database
env:
SUCC_DB_PORT: ${{ job.services.mariadb.ports[3306] }}
run: bin/db "select count(*) from sovereign"
- name: Install modules
run: cpanm --installdeps .
- name: Run tests
env:
SUCC_DB_PORT: ${{ job.services.mariadb.ports[3306] }}
run: prove -ISuccession/lib -v Succession/t

0 comments on commit 3c5a799

Please sign in to comment.