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.yml43
1 files changed, 26 insertions, 17 deletions
diff --git a/.github/workflows/api-integration-tests.yml b/.github/workflows/api-integration-tests.yml
index 117e7af49..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,26 +28,22 @@ jobs:
- 5432:5432 # Maps tcp port 5432 on service container to the host
strategy:
matrix:
- php-versions: ['7.4', '8.0']
- nextcloud: ['stable22', 'stable23']
+ php-versions: ['8.0', '8.1']
+ nextcloud: ['stable27']
database: ['sqlite', 'pgsql', 'mysql']
experimental: [false]
include:
- - php-versions: '8.0'
+ - php-versions: 8.1
nextcloud: pre-release
database: sqlite
experimental: true
- - php-versions: '8.1'
+ - php-versions: 8.2
nextcloud: pre-release
database: sqlite
experimental: true
- - php-versions: 8.1
- nextcloud: stable24
- database: sqlite
- experimental: false
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
submodules: recursive
@@ -57,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 & httpie
- run: sudo apt-get install -y bats httpie
+ run: sudo apt-get install -y httpie && npm install -g bats@1.7.0
### MySQL specific setup
- name: Setup mysql
@@ -101,7 +99,7 @@ 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
@@ -114,15 +112,17 @@ jobs:
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
-
- - name: Setup problem matchers for PHP
- run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
+ kill %2
- name: Functional tests maintenance
working-directory: ../server
@@ -131,7 +131,16 @@ jobs:
- name: Functional tests
working-directory: ../server
- run: bats apps/news/tests/command
+ 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