Skip to content

Commit a30940d

Browse files
committed
add github actions
1 parent ef2c2ed commit a30940d

File tree

3 files changed

+45
-4
lines changed

3 files changed

+45
-4
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "composer" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "monthly"
12+
13+
- package-ecosystem: "github-actions"
14+
# Workflow files stored in the
15+
# default location of `.github/workflows`
16+
directory: "/"
17+
schedule:
18+
interval: "monthly"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4+
#
5+
# Source repository: https://github.com/actions/dependency-review-action
6+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7+
name: 'Dependency Review'
8+
on: [pull_request]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: 'Checkout Repository'
18+
uses: actions/checkout@v3
19+
- name: 'Dependency Review'
20+
uses: actions/dependency-review-action@v3

.github/workflows/tests.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PHPUnit tests
1+
name: Tests
22

33
on:
44
- push
@@ -10,23 +10,26 @@ jobs:
1010
strategy:
1111
fail-fast: true
1212
matrix:
13-
php: [7.2, 7.3, 7.4, 8.0]
13+
php: [7.4, 8.0, 8.1]
1414

1515
name: Tests on PHP ${{ matrix.php }} - ${{ matrix.stability }}
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020

2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@v2
2323
with:
2424
php-version: ${{ matrix.php }}
25-
tools: composer:v2
25+
tools: composer:v2, phpstan
2626
coverage: none
2727

2828
- name: Install dependencies
2929
run: composer update --prefer-source --no-interaction --no-progress
3030

3131
- name: Execute tests
3232
run: vendor/bin/phpunit --verbose
33+
34+
- name: Run PHPStan
35+
run: phpstan analyse src --level=5

0 commit comments

Comments
 (0)