mirror of
https://github.com/e107inc/e107.git
synced 2025-08-10 00:27:45 +02:00
Automated acceptance tests
Includes a Dockerfile that can be used to build the ghcr.io/e107inc/e107/e107-dev container
This commit is contained in:
53
.github/workflows/test-acceptance.yml
vendored
Normal file
53
.github/workflows/test-acceptance.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Acceptance Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test-acceptance:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: php:latest
|
||||
services:
|
||||
target:
|
||||
image: ghcr.io/e107inc/e107/e107-dev:latest
|
||||
ports:
|
||||
- 22
|
||||
- 80
|
||||
- 3306
|
||||
options: >-
|
||||
--tmpfs /tmp
|
||||
--tmpfs /run
|
||||
--tmpfs /run/lock
|
||||
--volume /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
|
||||
steps:
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y git zip libzip-dev sshpass rsync
|
||||
|
||||
- name: Install necessary PHP extensions
|
||||
run: docker-php-ext-install -j "$(nproc)" zip pdo_mysql mysqli
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Composer
|
||||
run: curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
|
||||
|
||||
- name: Install test dependencies
|
||||
run: composer update --prefer-dist --no-progress
|
||||
working-directory: ./e107_tests/
|
||||
|
||||
- name: Download Git submodule dependencies
|
||||
run: git submodule update --init --recursive --remote
|
||||
|
||||
- name: Install the CI test configuration file
|
||||
run: |
|
||||
cp ./e107_tests/lib/ci/config.ci.yml ./e107_tests/config.yml
|
||||
sed -i "s/host: 'db'/host: 'target'/" ./e107_tests/config.yml
|
||||
|
||||
- name: Run acceptance tests
|
||||
run: php ./vendor/bin/codecept run acceptance --steps --debug
|
||||
working-directory: ./e107_tests/
|
4
.github/workflows/test-unit.yml
vendored
4
.github/workflows/test-unit.yml
vendored
@@ -11,7 +11,7 @@ env:
|
||||
CC_TEST_REPORTER_ID: 8948074581c1ffe7f4e47995c65d7d303882310256edd73536723d7c92adb1e3
|
||||
|
||||
jobs:
|
||||
test:
|
||||
test-unit:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -105,7 +105,7 @@ jobs:
|
||||
- name: Install Composer
|
||||
run: curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install test dependencies
|
||||
run: composer update --prefer-dist --no-progress
|
||||
working-directory: ./e107_tests/
|
||||
|
||||
|
Reference in New Issue
Block a user