-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (57 loc) · 1.97 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build
on:
pull_request:
workflow_dispatch:
concurrency:
group: build-deploy
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
uses: "php-actions/composer@v6"
with:
php_extensions: sockets
dev: no
progress: yes
working_dir: "./Src/"
- name: Create MySQL secrets file
run: |
cd Src
mkdir -p secrets
cd secrets
echo "<?php" >> mySql.secrets.php
echo "\$mySqlHost = \"database\";" >> mySql.secrets.php
echo "\$mySqlUser = \"test\";" >> mySql.secrets.php
echo "\$mySqlPassword = \"test\";" >> mySql.secrets.php
echo "\$mySqlDatabase = \"test\";" >> mySql.secrets.php
- name: Docker compose up
run: docker compose up -d && sleep 10
- name: Check database
env:
MYSQL_PWD: test
run: |
chmod +x Tools/db-check.sh
Tools/db-check.sh "localhost" "test" "test"
- name: Test branches handler
run: curl --location http://localhost:8007/branches.php
- name: Test Comments handler
run: curl --location http://localhost:8007/comments.php
- name: Test Issues handler
run: curl --location http://localhost:8007/issues.php
- name: Test Pull Requests handler
run: curl --location http://localhost:8007/pullRequests.php
- name: Test Pushes handler
run: curl --location http://localhost:8007/pushes.php
- name: Test Repositories handler
run: curl --location http://localhost:8007/repositories.php
- name: Test Signature handler
run: curl --location http://localhost:8007/signature.php