Skip to content

Commit 34027ab

Browse files
committed
ci: test server start
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
1 parent c78528e commit 34027ab

1 file changed

Lines changed: 79 additions & 75 deletions

File tree

.github/workflows/shared_workflow.yml

Lines changed: 79 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -10,70 +10,70 @@ on:
1010
nextcloud_versions:
1111
required: false
1212
type: string
13-
default: "30 31 32 master"
13+
default: "32 master"
1414
php_versions:
1515
required: false
1616
type: string
17-
default: "8.1 8.2 8.3"
17+
default: "8.3"
1818

1919
name: CI
2020

2121
jobs:
22-
js-lint-unit:
23-
name: js lint and unit tests
24-
runs-on: ubuntu-22.04
25-
steps:
26-
- name: Checkout for nightly CI
27-
if: github.event_name == 'schedule'
28-
uses: actions/checkout@v3
29-
with:
30-
ref: ${{ inputs.branch }}
31-
32-
- name: Checkout
33-
if: github.event_name != 'schedule'
34-
uses: actions/checkout@v3
35-
36-
- name: Read package.json node and npm engines version
37-
uses: skjnldsv/read-package-engines-version-actions@v2
38-
id: versions
39-
with:
40-
fallbackNode: '^14'
41-
fallbackNpm: '^7'
42-
43-
- name: Setup NodeJS ${{ steps.versions.outputs.nodeVersion }}
44-
uses: actions/setup-node@v3
45-
with:
46-
node-version: ${{ steps.versions.outputs.nodeVersion }}
47-
cache: 'npm'
48-
49-
- name: Setup NPM ${{ steps.versions.outputs.npmVersion }}
50-
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
51-
52-
- name: Install NPM Dependencies
53-
run: npm install
54-
55-
- name: JS Lint
56-
run: make lint-js || ( echo 'Please run `make lint-js-fix` to format your code' && exit 1 )
57-
58-
- name: Vue Unit tests
59-
run: |
60-
make jsunit
61-
62-
- name: JS Code Coverage Summary Report
63-
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'stable29' && matrix.phpVersion == '8.1' }}
64-
uses: romeovs/lcov-reporter-action@v0.3.1
65-
with:
66-
github-token: ${{ secrets.GITHUB_TOKEN }}
67-
lcov-file: ./coverage/jest/lcov.info
68-
delete-old-comments: true
69-
title: "JS Code Coverage"
70-
71-
- name: JS coverage check
72-
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'stable29' && matrix.phpVersion == '8.1' }}
73-
uses: VeryGoodOpenSource/very_good_coverage@v2
74-
with:
75-
min_coverage: '59'
76-
path: './server/apps/integration_openproject/coverage/jest/lcov.info'
22+
# js-lint-unit:
23+
# name: js lint and unit tests
24+
# runs-on: ubuntu-22.04
25+
# steps:
26+
# - name: Checkout for nightly CI
27+
# if: github.event_name == 'schedule'
28+
# uses: actions/checkout@v3
29+
# with:
30+
# ref: ${{ inputs.branch }}
31+
#
32+
# - name: Checkout
33+
# if: github.event_name != 'schedule'
34+
# uses: actions/checkout@v3
35+
#
36+
# - name: Read package.json node and npm engines version
37+
# uses: skjnldsv/read-package-engines-version-actions@v2
38+
# id: versions
39+
# with:
40+
# fallbackNode: '^14'
41+
# fallbackNpm: '^7'
42+
#
43+
# - name: Setup NodeJS ${{ steps.versions.outputs.nodeVersion }}
44+
# uses: actions/setup-node@v3
45+
# with:
46+
# node-version: ${{ steps.versions.outputs.nodeVersion }}
47+
# cache: 'npm'
48+
#
49+
# - name: Setup NPM ${{ steps.versions.outputs.npmVersion }}
50+
# run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
51+
#
52+
# - name: Install NPM Dependencies
53+
# run: npm install
54+
#
55+
# - name: JS Lint
56+
# run: make lint-js || ( echo 'Please run `make lint-js-fix` to format your code' && exit 1 )
57+
#
58+
# - name: Vue Unit tests
59+
# run: |
60+
# make jsunit
61+
#
62+
# - name: JS Code Coverage Summary Report
63+
# if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'stable29' && matrix.phpVersion == '8.1' }}
64+
# uses: romeovs/lcov-reporter-action@v0.3.1
65+
# with:
66+
# github-token: ${{ secrets.GITHUB_TOKEN }}
67+
# lcov-file: ./coverage/jest/lcov.info
68+
# delete-old-comments: true
69+
# title: "JS Code Coverage"
70+
#
71+
# - name: JS coverage check
72+
# if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'stable29' && matrix.phpVersion == '8.1' }}
73+
# uses: VeryGoodOpenSource/very_good_coverage@v2
74+
# with:
75+
# min_coverage: '59'
76+
# path: './server/apps/integration_openproject/coverage/jest/lcov.info'
7777

7878
create-matrix:
7979
runs-on: ubuntu-22.04
@@ -229,10 +229,10 @@ jobs:
229229
composer install --no-interaction --prefer-dist --optimize-autoloader --working-dir=../user_oidc
230230
cd server && ./occ maintenance:install --admin-pass=admin
231231
232-
- name: PHP code analysis and linting
233-
run: |
234-
make psalm
235-
make phpcs || ( echo 'Please run `make phpcs-fix` to format your code' && exit 1 )
232+
# - name: PHP code analysis and linting
233+
# run: |
234+
# make psalm
235+
# make phpcs || ( echo 'Please run `make phpcs-fix` to format your code' && exit 1 )
236236

237237
- name: Enable apps
238238
run: |
@@ -248,10 +248,10 @@ jobs:
248248
./occ a:e -f oidc
249249
fi
250250
251-
- name: PHP Unit Tests
252-
run: |
253-
cd server/apps/integration_openproject
254-
make phpunit || (echo "A few of the unit tests were unsuccessful. Rerunning the unit test once again......" && make phpunit)
251+
# - name: PHP Unit Tests
252+
# run: |
253+
# cd server/apps/integration_openproject
254+
# make phpunit || (echo "A few of the unit tests were unsuccessful. Rerunning the unit test once again......" && make phpunit)
255255

256256
- name: Setup .NET Core # this is required to execute Convert PHP cobertura coverage to lcov step
257257
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'stable29' && matrix.phpVersion == '8.1' }}
@@ -300,25 +300,29 @@ jobs:
300300
# Disable share rate limit protection
301301
docker exec nextcloud /bin/bash -c 'occ config:system:set ratelimit.protection.enabled --value false --type bool'
302302
303+
- name: Check output
304+
run: |
305+
curl -k -s http://localhost/status.php
306+
303307
- name: API Tests
304308
env:
305309
NEXTCLOUD_BASE_URL: http://localhost
306310
run: |
307311
composer install --no-progress --prefer-dist --optimize-autoloader
308-
if ! timeout 5m bash -c '
309-
until curl -s -f http://localhost/status.php | grep '"'"'"installed":true'"'"'; do
310-
echo "[INFO] Waiting for server to be ready..."
311-
sleep 10
312-
done
313-
'; then
314-
echo "[ERROR] Server not ready within 5 minutes."
315-
exit 1
316-
fi
312+
# if ! timeout 5m bash -c '
313+
# until curl -s -f http://localhost/status.php | grep '"'"'"installed":true'"'"'; do
314+
# echo "[INFO] Waiting for server to be ready..."
315+
# sleep 10
316+
# done
317+
# '; then
318+
# echo "[ERROR] Server not ready within 5 minutes."
319+
# exit 1
320+
# fi
317321
make api-test
318322

319323
notify-nightly-report:
320324
needs:
321-
- js-lint-unit
325+
# - js-lint-unit
322326
- api-phpunit-tests
323327
if: ${{ always() && github.event_name == 'schedule' }}
324328
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)