Skip to content

Commit 9e9e053

Browse files
committed
fix(ci): sync lint CI
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
1 parent 8b9fa43 commit 9e9e053

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed

.github/workflows/lint.yml

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,14 @@ jobs:
3838
xml-schema-file: ./info.xsd
3939

4040
php-lint:
41-
runs-on: ubuntu-latest
41+
runs-on: ubuntu-22.04
42+
name: php-lint
4243
strategy:
4344
matrix:
4445
php-versions: ["8.1", "8.2"]
4546

46-
name: php-lint
47-
4847
steps:
49-
- name: Checkout
50-
uses: actions/checkout@v3
48+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
5149

5250
- name: Set up php ${{ matrix.php-versions }}
5351
uses: shivammathur/setup-php@v2
@@ -59,17 +57,19 @@ jobs:
5957
run: composer run lint
6058

6159
php-cs:
62-
runs-on: ubuntu-latest
60+
runs-on: ubuntu-22.04
6361
name: php-cs
62+
strategy:
63+
matrix:
64+
php-versions: [ "8.1", "8.2" ]
6465

6566
steps:
66-
- name: Checkout
67-
uses: actions/checkout@v3
67+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
6868

6969
- name: Set up php ${{ matrix.php-versions }}
7070
uses: shivammathur/setup-php@v2
7171
with:
72-
php-version: 8.1
72+
php-version: ${{ matrix.php-versions }}
7373
coverage: none
7474

7575
- name: Install dependencies
@@ -79,32 +79,50 @@ jobs:
7979
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
8080

8181
php-psalm-analysis:
82-
runs-on: ubuntu-latest
82+
runs-on: ubuntu-22.04
8383
strategy:
8484
matrix:
85-
php-versions: ["8.1", "8.2"]
86-
ocp-version: ['dev-master']
85+
php-versions: [ "8.1", "8.2" ]
86+
server-versions: [ '30' ]
8787
name: php-psalm-analysis
8888

8989
steps:
90+
- name: Cache nextcloud server
91+
id: nextcloud_setup
92+
uses: actions/cache@v3
93+
with:
94+
path: nextcloud-${{ matrix.server-versions }}.zip
95+
key: ${{ matrix.server-versions }}
96+
97+
- name: Download nextcloud ${{ matrix.server-versions }}
98+
if: steps.nextcloud_setup.outputs.cache-hit != 'true'
99+
continue-on-error: true
100+
id: server-checkout
101+
run: |
102+
NCVERSION=${{ matrix.server-versions }}
103+
wget --quiet https://download.nextcloud.com/server/releases/latest-$NCVERSION.zip
104+
unzip latest-$NCVERSION.zip
105+
90106
- uses: actions/checkout@v3
107+
91108
- name: Set up php ${{ matrix.php-versions }}
92109
uses: shivammathur/setup-php@v2
93110
with:
94-
php-version: 7.4
111+
php-version: ${{ matrix.php-versions }}
95112
coverage: none
96113

97114
- name: Install dependencies
98115
run: composer i
99116

100-
- name: Install nextcloud/ocp
101-
run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }}
102-
103117
- name: Run coding standards check
104118
run: composer run psalm
105119

106120
php-security-analysis:
107-
runs-on: ubuntu-latest
121+
runs-on: ubuntu-22.04
122+
permissions:
123+
contents: read
124+
actions: read
125+
security-events: write
108126
name: security analysis
109127
steps:
110128
- uses: actions/checkout@v3
@@ -124,24 +142,24 @@ jobs:
124142
sarif_file: results.sarif
125143

126144
js-eslint:
127-
runs-on: ubuntu-latest
145+
runs-on: ubuntu-22.04
128146
name: eslint
129147

130148
steps:
131-
- uses: actions/checkout@v3
149+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
132150
- name: Install dependencies
133151
run: npm ci
134152

135153
- name: ESLint
136154
run: npm run lint
137155

138156
stylelint:
139-
runs-on: ubuntu-latest
157+
runs-on: ubuntu-22.04
140158

141159
name: stylelint
142160

143161
steps:
144-
- uses: actions/checkout@v3
162+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
145163
- name: Install dependencies
146164
run: npm ci
147165

0 commit comments

Comments
 (0)