Skip to content

Run unit tests in CI #29

Run unit tests in CI

Run unit tests in CI #29

name: Deploy LibriVox local development environment
on:
pull_request:
workflow_dispatch:
jobs:
deploy-localdev:
runs-on: 'ubuntu-22.04'
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create LXC container
uses: lkiesow/setup-lxc-container@v1
id: lxc
with:
dist: ubuntu
release: jammy
name: librivox.org
- name: Run localdev.yaml playbook
uses: dawidd6/action-ansible-playbook@v2
with:
playbook: localdev.yaml
inventory: |
[localdev]
${{ steps.lxc.outputs.ip }} ansible_user=root ci_env=development ci_log_threshold=4
options:
-l localdev
- name: Ensure resulting website health
# This relies on the LXC container creation step having added an
# /etc/hosts for librivox.org pointing to the container.
uses: notartom/website-healthcheck@v6
with:
web-url: "https://librivox.org/dust-of-the-desert-by-robert-welles-ritchie/"
scan-for-text: "BENICIA"
insecure: true
- name: Run unit tests
run: |
ssh librivox.org 'cd /librivox/www/librivox.org/catalog && XDEBUG_MODE=coverage vendor/bin/phpunit -c application/tests'