summaryrefslogtreecommitdiffstats
path: root/.github/workflows/api-integration-tests.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/api-integration-tests.yml')
-rw-r--r--.github/workflows/api-integration-tests.yml53
1 files changed, 40 insertions, 13 deletions
diff --git a/.github/workflows/api-integration-tests.yml b/.github/workflows/api-integration-tests.yml
index 297ee7446..0ab974e2a 100644
--- a/.github/workflows/api-integration-tests.yml
+++ b/.github/workflows/api-integration-tests.yml
@@ -16,7 +16,7 @@ jobs:
name: "Integration: Nextcloud ${{ matrix.nextcloud }} - PHP ${{ matrix.php-versions }} - DB ${{ matrix.database }}"
services:
postgres:
- image: postgres
+ image: postgres:14
env:
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
options: >-
@@ -28,22 +28,24 @@ jobs:
- 5432:5432 # Maps tcp port 5432 on service container to the host
strategy:
matrix:
- php-versions: ['7.3', '7.4']
- nextcloud: ['stable20', 'stable21', 'stable22']
+ php-versions: ['8.0', '8.1']
+ nextcloud: ['stable27']
database: ['sqlite', 'pgsql', 'mysql']
experimental: [false]
include:
- - php-versions: 7.4
+ - php-versions: 8.1
nextcloud: pre-release
database: sqlite
experimental: true
- - php-versions: 8.0
+ - php-versions: 8.2
nextcloud: pre-release
database: sqlite
experimental: true
steps:
- name: Checkout
- uses: actions/checkout@v2.3.4
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -51,9 +53,11 @@ jobs:
php-version: ${{ matrix.php-versions }}
extensions: pdo_sqlite,pdo_mysql,pdo_pgsql,gd,zip
coverage: none
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Setup BATS
- uses: mig4/setup-bats@v1.2.0
+ - name: Setup BATS & httpie
+ run: sudo apt-get install -y httpie && npm install -g bats@1.7.0
### MySQL specific setup
- name: Setup mysql
@@ -95,17 +99,30 @@ jobs:
database-password: ${{ env.POSTGRES_PASSWORD }}
- name: Prime app build
- run: make
+ run: make composer
- name: Configure server with app
uses: SMillerDev/nextcloud-actions/setup-nextcloud-app@main
with:
app: 'news'
- check-code: true
+ check-code: false
force: ${{ matrix.experimental }}
- - name: Setup problem matchers for PHP
- run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
+ - name: Run API tests
+ working-directory: ../server
+ run: |
+ php -S localhost:8080 &> /tmp/webserver.log &
+ cd apps/news/tests/test_helper/feeds && php -S localhost:8090 &> /tmp/feedserver.log &
+
+ sleep 2
+
+ cd ${{ github.workspace }}/../server
+
+ bats apps/news/tests/api
+
+ # Kill php server
+ kill %1
+ kill %2
- name: Functional tests maintenance
working-directory: ../server
@@ -114,7 +131,16 @@ jobs:
- name: Functional tests
working-directory: ../server
- run: bats apps/news/tests/integration
+ run: |
+ cd apps/news/tests/test_helper/feeds && php -S localhost:8090 &> /tmp/feedserver.log &
+
+ sleep 2
+
+ cd ${{ github.workspace }}/../server
+
+ bats apps/news/tests/command
+
+ kill %1
- name: Prep PHP tests
working-directory: ../server/apps/news
@@ -123,3 +149,4 @@ jobs:
- name: Feed tests
working-directory: ../server/apps/news
run: make feed-test
+