generated from mixerapi/app
-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (46 loc) · 1.6 KB
/
build.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: Build
on: [pull_request]
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: mbstring, intl, sqlite3, mysqli
- name: Test
run: |
cd app
composer validate
composer install --prefer-dist --no-interaction --no-progress
mkdir -p plugins/AuthenticationApi/config/keys/1
openssl genrsa -out plugins/AuthenticationApi/config/keys/1/private.pem 2048
openssl rsa -in plugins/AuthenticationApi/config/keys/1/private.pem -outform PEM -pubout -out plugins/AuthenticationApi/config/keys/1/public.pem
openssl rand -base64 24 > plugins/AuthenticationApi/config/keys/hmac_secret.txt
cp config/.env.example config/.env
cp config/app_local.example.php config/app_local.php
vendor/bin/phpunit
build:
name: Docker Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Env Files
run: |
cp .docker/php.env.development .docker/php.env
cp .docker/mysql.env.development .docker/mysql.env
- name: Pull images
run: docker-compose pull
- name: Build
run: docker-compose build --build-arg UID=$(id -u) --build-arg ENV=dev
- name: Start
run: docker-compose up -d
- name: Wait for services
run: sleep 5
- name: HTTP Check
run: curl -v -o /dev/null http://localhost:8080