|
10 | 10 | nextcloud_versions: |
11 | 11 | required: false |
12 | 12 | type: string |
13 | | - # default: "30 31 32 master" |
14 | | - default: "master" |
| 13 | + default: "30 31 32" |
15 | 14 | php_versions: |
16 | 15 | required: false |
17 | 16 | type: string |
18 | | - # default: "8.1 8.2 8.3" |
19 | | - default: "8.1" |
| 17 | + default: "8.1 8.2 8.3" |
20 | 18 |
|
21 | 19 | name: CI |
22 | 20 |
|
23 | 21 | jobs: |
24 | | - # js-lint-unit: |
25 | | - # name: js lint and unit tests |
26 | | - # runs-on: ubuntu-22.04 |
27 | | - # steps: |
28 | | - # - name: Checkout for nightly CI |
29 | | - # if: github.event_name == 'schedule' |
30 | | - # uses: actions/checkout@v3 |
31 | | - # with: |
32 | | - # ref: ${{ inputs.branch }} |
33 | | - |
34 | | - # - name: Checkout |
35 | | - # if: github.event_name != 'schedule' |
36 | | - # uses: actions/checkout@v3 |
37 | | - |
38 | | - # - name: Read package.json node and npm engines version |
39 | | - # uses: skjnldsv/read-package-engines-version-actions@v2 |
40 | | - # id: versions |
41 | | - # with: |
42 | | - # fallbackNode: '^14' |
43 | | - # fallbackNpm: '^7' |
44 | | - |
45 | | - # - name: Setup NodeJS ${{ steps.versions.outputs.nodeVersion }} |
46 | | - # uses: actions/setup-node@v3 |
47 | | - # with: |
48 | | - # node-version: ${{ steps.versions.outputs.nodeVersion }} |
49 | | - # cache: 'npm' |
50 | | - |
51 | | - # - name: Setup NPM ${{ steps.versions.outputs.npmVersion }} |
52 | | - # run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" |
53 | | - |
54 | | - # - name: Install NPM Dependencies |
55 | | - # run: npm install |
56 | | - |
57 | | - # - name: JS Lint |
58 | | - # run: make lint-js || ( echo 'Please run `make lint-js-fix` to format your code' && exit 1 ) |
59 | | - |
60 | | - # - name: Vue Unit tests |
61 | | - # run: | |
62 | | - # make jsunit |
63 | | - |
64 | | - # - name: JS Code Coverage Summary Report |
65 | | - # if: ${{ github.event_name == 'pull_request' }} |
66 | | - |
67 | | - # with: |
68 | | - # github-token: ${{ secrets.GITHUB_TOKEN }} |
69 | | - # lcov-file: ./coverage/jest/lcov.info |
70 | | - # delete-old-comments: true |
71 | | - # title: "JS Code Coverage" |
72 | | - |
73 | | - # - name: JS coverage check |
74 | | - # if: ${{ github.event_name == 'pull_request' }} |
75 | | - # uses: VeryGoodOpenSource/very_good_coverage@v2 |
76 | | - # with: |
77 | | - # min_coverage: '59' |
78 | | - # path: './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' }} |
| 64 | + |
| 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' }} |
| 73 | + uses: VeryGoodOpenSource/very_good_coverage@v2 |
| 74 | + with: |
| 75 | + min_coverage: '59' |
| 76 | + path: './coverage/jest/lcov.info' |
79 | 77 |
|
80 | 78 | create-matrix: |
81 | 79 | runs-on: ubuntu-22.04 |
|
97 | 95 | PHP_VERSIONS: ${{ inputs.php_versions }} |
98 | 96 | DEFAULT_PHP_VERSION: "8.2" |
99 | 97 | DEFAULT_DATABASE: "mysql" |
100 | | - # EXTRA_DATABASES: "pgsql" |
| 98 | + EXTRA_DATABASES: "pgsql" |
101 | 99 | run: | |
102 | 100 | MATRIX=$(./.github/scripts/generate-matrix.sh) |
103 | 101 | echo "matrix={\"include\": [$MATRIX]}" >> $GITHUB_OUTPUT |
@@ -134,11 +132,11 @@ jobs: |
134 | 132 | volumes: |
135 | 133 | - ${{ github.workspace }}:/var/www/html/apps-shared |
136 | 134 |
|
137 | | - # database-postgres: |
138 | | - # image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest |
139 | | - # env: |
140 | | - # POSTGRES_PASSWORD: postgres |
141 | | - # POSTGRES_DB: nextcloud |
| 135 | + database-postgres: |
| 136 | + image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest |
| 137 | + env: |
| 138 | + POSTGRES_PASSWORD: postgres |
| 139 | + POSTGRES_DB: nextcloud |
142 | 140 |
|
143 | 141 | database-mysql: |
144 | 142 | image: ghcr.io/nextcloud/continuous-integration-mariadb-10.5:latest |
@@ -166,29 +164,6 @@ jobs: |
166 | 164 | path: activity |
167 | 165 | ref: ${{ matrix.nextcloudVersion }} |
168 | 166 |
|
169 | | - # - name: Checkout groupfolders app |
170 | | - # uses: actions/checkout@v3 |
171 | | - # with: |
172 | | - # repository: nextcloud/groupfolders |
173 | | - # path: groupfolders |
174 | | - # ref: ${{ matrix.nextcloudVersion }} |
175 | | - |
176 | | - # - name: Checkout user_oidc app |
177 | | - # uses: actions/checkout@v3 |
178 | | - # with: |
179 | | - # repository: nextcloud/user_oidc |
180 | | - # ref: v7.2.0 |
181 | | - # fetch-tags: true |
182 | | - # path: user_oidc |
183 | | - |
184 | | - # - name: Checkout oidc app |
185 | | - # uses: actions/checkout@v3 |
186 | | - # with: |
187 | | - # repository: h2CK/oidc |
188 | | - # ref: 1.6.0 |
189 | | - # fetch-tags: true |
190 | | - # path: oidc |
191 | | - |
192 | 167 | - name: Checkout server (for phpunit and psalm) |
193 | 168 | uses: actions/checkout@v3 |
194 | 169 | with: |
@@ -226,10 +201,10 @@ jobs: |
226 | 201 | cd server |
227 | 202 | ./occ maintenance:install --admin-pass=admin |
228 | 203 |
|
229 | | - # - name: PHP code analysis and linting |
230 | | - # run: | |
231 | | - # make psalm |
232 | | - # make phpcs || ( echo 'Please run `make phpcs-fix` to format your code' && exit 1 ) |
| 204 | + - name: PHP code analysis and linting |
| 205 | + run: | |
| 206 | + make psalm |
| 207 | + make phpcs || ( echo 'Please run `make phpcs-fix` to format your code' && exit 1 ) |
233 | 208 |
|
234 | 209 | - name: Enable apps (for phpunit) |
235 | 210 | run: | |
@@ -315,7 +290,7 @@ jobs: |
315 | 290 |
|
316 | 291 | notify-nightly-report: |
317 | 292 | needs: |
318 | | - # - js-lint-unit |
| 293 | + - js-lint-unit |
319 | 294 | - api-phpunit-tests |
320 | 295 | if: ${{ always() && github.event_name == 'schedule' }} |
321 | 296 | runs-on: ubuntu-22.04 |
|
0 commit comments