mirror of
https://github.com/jkaninda/nginx-php-fpm.git
synced 2025-12-06 21:49:41 +01:00
Add Integration test
This commit is contained in:
38
.github/workflows/integration-tests.yml
vendored
Normal file
38
.github/workflows/integration-tests.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Integration Test
|
||||
on:
|
||||
push:
|
||||
jobs:
|
||||
integration:
|
||||
services:
|
||||
nginx-php-fpm:
|
||||
image: jkaninda/nginx-php-fpm:latest
|
||||
ports:
|
||||
- "80:80"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Create Laravel project
|
||||
run: |
|
||||
composer create-project laravel/laravel laravel
|
||||
- name: Fix Permission
|
||||
run: chmod -R 777 ./laravel/storage
|
||||
#- name: Run docker-compose
|
||||
# run: docker-compose up -d
|
||||
- name: Create script.js for K6 test
|
||||
run: |
|
||||
touch script.js && cat > script.js <<EOF
|
||||
import http from 'k6/http';
|
||||
import { sleep } from 'k6';
|
||||
|
||||
export default function () {
|
||||
//Link
|
||||
http.get('http://nginx-php-fpm');
|
||||
}
|
||||
EOF
|
||||
- name: Run k6 local test
|
||||
uses: grafana/k6-action@v0.3.1
|
||||
with:
|
||||
filename: script.js
|
||||
- name: Test with curl
|
||||
run: |
|
||||
curl -i http://localhost
|
||||
Reference in New Issue
Block a user