forked from artefactual/atom
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.44 KB
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Unit tests
on:
pull_request:
push:
branches:
- qa/**
- stable/**
jobs:
unit-tests:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4]
name: PHP ${{ matrix.php }}
env:
COMPOSE_FILE: ${{ github.workspace }}/docker/docker-compose.dev.yml
steps:
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: apcu
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Install dependencies
run: composer update
- name: Copy config files
run: |
cp test/bootstrap/config.php config/config.php
cp test/bootstrap/search.yml config/search.yml
cp config/propel.ini.tmpl config/propel.ini
cp apps/qubit/config/settings.yml.tmpl apps/qubit/config/settings.yml
- name: Increase virtual memory max_map_count
run: sudo sysctl -w vm.max_map_count=262144
- name: Start services
run: docker-compose up -d percona elasticsearch
- name: Sleep for 15 seconds
run: sleep 15
- name: Initialize database and search index
run: php symfony tools:purge --demo
- name: Run tests
run: composer test