Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,23 @@ jobs:
php -d memory_limit=1G vendor/bin/phpstan analyse . --error-format=checkstyle | ./reviewdog -f=checkstyle -name=PHPStan -reporter=github-pr-check
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

tests:
name: Tests
runs-on: ubuntu-24.04
needs: php-versions
strategy:
matrix:
php-version: ${{ fromJSON(needs.php-versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Run PHPUnit
run: vendor/bin/phpunit
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor/
docker-compose.override.yml
docker-compose.override.yml
.phpunit.cache/
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
.PHONY: check phpstan phpcs markdownlint
.PHONY: check phpstan phpcs phpunit markdownlint

check: phpstan phpcs markdownlint
check: phpstan phpcs phpunit markdownlint

phpstan:
-vendor/bin/phpstan analyse .

phpcs:
-vendor/bin/phpcs -s bin/ src/

phpunit:
-vendor/bin/phpunit

# gem install mdl
markdownlint:
-mdl *.md
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ It has some required and some optional settings, which are passed to the action
- `JIRA_RESTRICTED_COMMENT_ROLE`: A comment with restricted visibility
to this role is posted with info about who was added as watchers to
the issue. Defaults to `Developers`. (*Optional*)
- `JIRA_CLOSE_TRANSITION`: The Jira workflow transition name used when closing resolved alerts. Defaults to `Done`. (*Optional*)

Here is an example setup which runs this action every 6 hours.

Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"php": ">=8.3 <8.5",
"softonic/graphql-client": "^2.1",
"symfony/console": "^5",
"symfony/yaml": "^6.1",
"reload/jira-security-issue": "^2.0.11"
},
"repositories": [
Expand All @@ -20,8 +19,14 @@
"GitHubSecurityJira\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"GitHubSecurityJira\\Tests\\": "tests/"
}
},
"require-dev": {
"phpstan/phpstan": "^1",
"phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "^4.0",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-deprecation-rules": "^1.2"
Expand Down
Loading