From 90d004f7f768fb823839db39d31c4a77b85bd5f2 Mon Sep 17 00:00:00 2001 From: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Date: Mon, 30 Oct 2023 06:56:57 +0100 Subject: [PATCH] Don't build frontend code to save CI time when only running PHP tests Signed-off-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> --- .github/workflows/api-integration-tests.yml | 8 +++++--- .github/workflows/api-php-static-code-check.yml | 4 +++- .github/workflows/api-php-tests.yml | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/api-integration-tests.yml b/.github/workflows/api-integration-tests.yml index bf22f2501e..0ab974e2ac 100644 --- a/.github/workflows/api-integration-tests.yml +++ b/.github/workflows/api-integration-tests.yml @@ -53,6 +53,8 @@ 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 httpie && npm install -g bats@1.7.0 @@ -97,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 @@ -115,7 +117,7 @@ jobs: sleep 2 cd ${{ github.workspace }}/../server - + bats apps/news/tests/api # Kill php server @@ -135,7 +137,7 @@ jobs: sleep 2 cd ${{ github.workspace }}/../server - + bats apps/news/tests/command kill %1 diff --git a/.github/workflows/api-php-static-code-check.yml b/.github/workflows/api-php-static-code-check.yml index 034b7d34cd..9a37fc40cc 100644 --- a/.github/workflows/api-php-static-code-check.yml +++ b/.github/workflows/api-php-static-code-check.yml @@ -25,6 +25,8 @@ jobs: php-version: ${{ matrix.php-versions }} extensions: pdo_sqlite,pdo_mysql,pdo_pgsql,gd,zip coverage: none + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Set up server non MySQL uses: SMillerDev/nextcloud-actions/setup-nextcloud@main @@ -34,7 +36,7 @@ jobs: database-type: ${{ matrix.database }} - name: Build app - run: make + run: make composer - name: Configure server with app uses: SMillerDev/nextcloud-actions/setup-nextcloud-app@main diff --git a/.github/workflows/api-php-tests.yml b/.github/workflows/api-php-tests.yml index 2723e14ea8..2fb7907700 100644 --- a/.github/workflows/api-php-tests.yml +++ b/.github/workflows/api-php-tests.yml @@ -32,6 +32,8 @@ jobs: php-version: ${{ matrix.php-versions }} extensions: pdo_sqlite,pdo_mysql,pdo_pgsql,gd,zip coverage: pcov + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ### Back to normal setup - name: Set up server non MySQL