mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 09:54:17 +02:00
integration tests using api-test
This commit is contained in:
parent
fd9a7e8527
commit
5f9dd4fd4c
1 changed files with 46 additions and 0 deletions
46
.github/workflows/ci.yaml
vendored
46
.github/workflows/ci.yaml
vendored
|
|
@ -53,3 +53,49 @@ jobs:
|
||||||
with:
|
with:
|
||||||
entrypoint: php
|
entrypoint: php
|
||||||
args: ./vendor/bin/phpunit test
|
args: ./vendor/bin/phpunit test
|
||||||
|
|
||||||
|
api:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
name: Integration tests
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: demostf/db
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: test
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
api:
|
||||||
|
image: demostf/api
|
||||||
|
env:
|
||||||
|
BASE_HOST: localhost
|
||||||
|
DEMO_ROOT: /tmp
|
||||||
|
DEMO_HOST: localhost
|
||||||
|
DB_TYPE: pgsql
|
||||||
|
DB_HOST: db
|
||||||
|
DB_PORT: 5432
|
||||||
|
DB_DATABASE: postgres
|
||||||
|
DB_USERNAME: postgres
|
||||||
|
DB_PASSWORD: test
|
||||||
|
APP_ROOT: https://localhost
|
||||||
|
EDIT_SECRET: edit
|
||||||
|
volumes:
|
||||||
|
- src:/app/src
|
||||||
|
nginx:
|
||||||
|
image: demostf/api-nginx-test
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: copy code
|
||||||
|
run: |
|
||||||
|
docker run -v src:/data --name helper busybox true
|
||||||
|
docker cp src/ helper:/data
|
||||||
|
docker rm helper
|
||||||
|
- env:
|
||||||
|
DB_URL: postgres://postgres:test@db:5432/postgres
|
||||||
|
BASE_URL: http://nginx
|
||||||
|
EDIT_KEY: edit
|
||||||
|
uses: docker://demostf/api-test
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue