Rename re-label to relabel #316
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test-module: | |
runs-on: ubuntu-latest | |
env: | |
MODULE_NAME: Largo | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
fetch-depth: 1 | |
- uses: actions/checkout@v1 | |
with: | |
repository: biigle/core | |
ref: master | |
fetch-depth: 1 | |
path: core | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
working-directory: ../core | |
- name: Copy .env | |
run: cp .env.example .env | |
working-directory: ../core | |
- name: Set testing key | |
run: echo "APP_KEY=base64:STZFA4bQKDjE2mlpRPmsJ/okG0eCh4RHd9BghtZeYmQ=" >> .env | |
working-directory: ../core | |
- name: Install Dependencies | |
run: composer install --no-ansi --no-interaction --no-scripts --prefer-dist --ignore-platform-reqs | |
working-directory: ../core | |
- name: Install current repository | |
run: | | |
composer config repositories.module --json '{"type": "path", "url": "'${GITHUB_WORKSPACE}'", "options": {"symlink": false}}' | |
composer require --no-ansi --no-interaction --no-scripts --ignore-platform-reqs ${GITHUB_REPOSITORY}:@dev | |
sed -i "/Insert Biigle module service providers/i Biigle\\\\Modules\\\\${MODULE_NAME}\\\\${MODULE_NAME}ServiceProvider::class," config/app.php | |
mkdir -p tests/php/Modules | |
ln -sf ../../../vendor/${GITHUB_REPOSITORY}/tests tests/php/Modules/${MODULE_NAME} | |
working-directory: ../core | |
- name: Fetch base images | |
run: | | |
docker pull ghcr.io/biigle/app:latest | |
docker pull ghcr.io/biigle/worker:latest | |
- name: Start test database | |
run: docker-compose up -d --no-build database_testing && sleep 5 | |
working-directory: ../core | |
- name: Run tests | |
run: docker-compose run --rm -u 1001 worker php -d memory_limit=1G vendor/bin/phpunit --random-order --filter 'Biigle\\Tests\\Modules\\'${MODULE_NAME} | |
working-directory: ../core |