-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (51 loc) · 2.01 KB
/
test-integration.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
50
51
name: test-integration
on:
pull_request:
push:
branches: [ master, develop ]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Generate SSL key and certificate
run: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./ci/files/tiqr.stepup.example.com.key -out ./ci/files/tiqr.stepup.example.com.crt -subj "/C=NL/ST=Netherlands/L=Amsterdam/O=TEST/CN=tiqr.example.com"
- name: Init environment
run: |
cd ci/docker
docker-compose up -d
- name: Install dependencies
run: |
cd ci/docker && docker-compose exec -T app.tiqr.stepup.example.com bash -lc '
cp .env.ci .env
cp config/legacy/parameters.yaml.dist config/legacy/parameters.yaml
composer install
yarn
'
- name: Build frontend assets
run: cd ci/docker && docker-compose exec -T app.tiqr.stepup.example.com bash -lc 'yarn encore production'
- name: Run test scripts
run: cd ci/docker && docker-compose exec -T app.tiqr.stepup.example.com bash -lc ' composer test '
- name: Output log files on failure
if: failure()
run: tail -2000 /var/log/syslog