Skip to content

Commit 293c12a

Browse files
authored
[fix] tests workflows
1 parent a4c310d commit 293c12a

File tree

6 files changed

+21
-26
lines changed

6 files changed

+21
-26
lines changed

.github/workflows/codacy.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ permissions:
2222
contents: read
2323

2424
env:
25-
UBUNTU_VERSION: ubuntu-latest
2625
NODE_VERSION: latest
2726
PHP_VERSION: 8.3
2827
PHPUNIT_VERSION: 11
@@ -34,7 +33,7 @@ jobs:
3433
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
3534
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
3635
name: Codacy Security Scan
37-
runs-on: ${{ env.UBUNTU_VERSION }}
36+
runs-on: ubuntu-latest
3837
steps:
3938
# Checkout the repository to the GitHub Actions runner
4039
- name: Checkout code
@@ -64,7 +63,7 @@ jobs:
6463

6564
codacy-coverage-reporter:
6665
name: Codacy Coverage Reporter
67-
runs-on: ${{ env.UBUNTU_VERSION }}
66+
runs-on: ubuntu-latest
6867
steps:
6968
- name: Setup PHP ${{ env.PHP_VERSION }}
7069
uses: shivammathur/setup-php@v2

.github/workflows/dependency-review.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
55
# Source repository: https://github.com/actions/dependency-review-action
66
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
77
name: "Dependency Review"
8-
on: [pull_request]
8+
on:
9+
pull_request:
10+
branches: ["master", "main"]
911

1012
permissions:
1113
contents: read
1214
pull-requests: write
1315

14-
env:
15-
UBUNTU_VERSION: ubuntu-latest
16-
1716
jobs:
1817
dependency-review:
1918
name: Dependency Review
20-
runs-on: ${{ env.UBUNTU_VERSION }}
19+
runs-on: ubuntu-latest
2120
steps:
2221
- name: "Checkout Repository"
2322
uses: actions/checkout@v4

.github/workflows/devskim.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ on:
1515
# eslint-disable-next-line yml/no-empty-mapping-value
1616
workflow_dispatch:
1717

18-
env:
19-
UBUNTU_VERSION: ubuntu-latest
20-
2118
jobs:
2219
lint:
2320
name: DevSkim
24-
runs-on: ${{ env.UBUNTU_VERSION }}
21+
runs-on: ubuntu-latest
2522
permissions:
2623
actions: read
2724
contents: read

.github/workflows/sonarcloud.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ permissions:
1919
pull-requests: read # allows SonarCloud to decorate PRs with analysis results
2020

2121
env:
22-
UBUNTU_VERSION: ubuntu-latest
2322
NODE_VERSION: latest
2423
PHP_VERSION: 8.3
2524
PHPUNIT_VERSION: 11
2625

2726
jobs:
2827
sonarqube:
2928
name: SonarQube
30-
runs-on: ${{ env.UBUNTU_VERSION }}
29+
runs-on: ubuntu-latest
3130

3231
steps:
3332
- name: Setup PHP ${{ env.PHP_VERSION }}

.github/workflows/tests.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ jobs:
3232
phpunit-versions: 12
3333
- php-versions: "8.4"
3434
phpunit-versions: 12
35-
env:
36-
- PHP_CS_FIXER_IGNORE_ENV: 1
35+
3736
runs-on: ${{ matrix.operating-system }}
38-
name: OS ${{ operating-system }} | PHP ${{ matrix.php-versions }}
37+
name: OS ${{ matrix.operating-system }} | PHP ${{ matrix.php-versions }}
3938

4039
steps:
4140
- name: Setup PHP ${{ matrix.php-versions }}
@@ -91,10 +90,12 @@ jobs:
9190
- name: Server warm up
9291
run: sleep 5
9392

94-
# TODO: the problem is that Prettier does not work properly on Windows. Good to fix this in the future.
95-
- if: matrix.operating-system == 'windows-latest'
96-
name: Run short test suite
97-
run: npm run test:small
98-
- if: matrix.operating-system != 'windows-latest'
99-
name: Run full test suite
93+
- if: matrix.php-versions != '8.4'
94+
name: Run test suite
95+
shell: bash
10096
run: npm run test
97+
98+
- if: matrix.php-versions == '8.4'
99+
name: Run test suite for PHP 8.4
100+
shell: bash
101+
run: npm run test:8.4

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"markdownlint": "markdownlint --config .markdownlint.json \"*.md\"",
1414
"package": "npx npm-package-json-lint .",
1515
"php": "npm run phpcs && npm run phpmd && npm run phpcs-fixer",
16+
"php:8.4": "npm run phpcs && npm run phpmd",
1617
"phpcs": "php ./vendor/bin/phpcs --standard=PSR2 src/",
1718
"phpcs-fixer": "php ./vendor/bin/php-cs-fixer --verbose check",
1819
"phpcs-fixer:fix": "php ./vendor/bin/php-cs-fixer fix",
@@ -23,10 +24,9 @@
2324
"psalm": "php ./vendor/bin/psalm --show-info=true",
2425
"sort": "sort-package-json ./package.json ./composer.json",
2526
"start-server": "npx serve -n tests/data",
26-
"style": "npm run style:windows && npm run prettier",
27-
"style:windows": "npm run markdown && npm run markdownlint && npm run json && npm run package && npm run lint",
27+
"style": "npm run markdown && npm run markdownlint && npm run json && npm run package && npm run lint && npm run prettier",
2828
"test": "npm run style && npm run php && npm run coverage",
29-
"test:small": "npm run style:windows && npm run php && npm run coverage"
29+
"test:8.4": "npm run style && npm run php:8.4 && npm run coverage"
3030
},
3131
"remarkConfig": {
3232
"plugins": [

0 commit comments

Comments
 (0)