Skip to content

Commit bf5ab49

Browse files
committed
added GitHub Actions workflows
1 parent c3107d0 commit bf5ab49

3 files changed

Lines changed: 76 additions & 0 deletions

File tree

.github/workflows/coding-style.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Coding Style
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
nette_cc:
7+
name: Nette Code Checker
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: 8.3
14+
coverage: none
15+
16+
- run: composer create-project nette/code-checker temp/code-checker ^3 --no-progress
17+
- run: php temp/code-checker/code-checker --strict-types --no-progress
18+
19+
20+
nette_cs:
21+
name: Nette Coding Standard
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: 8.3
28+
coverage: none
29+
30+
- run: composer create-project nette/coding-standard temp/coding-standard ^3 --no-progress
31+
- run: php temp/coding-standard/ecs check
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Static Analysis
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
phpstan:
7+
name: PHPStan
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: shivammathur/setup-php@v2
12+
with:
13+
php-version: 8.5
14+
coverage: none
15+
16+
- run: composer install --no-progress --prefer-dist
17+
- run: composer phpstan -- --no-progress

.github/workflows/tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php: ['8.2', '8.3', '8.4', '8.5']
11+
12+
fail-fast: false
13+
14+
name: PHP ${{ matrix.php }} tests
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: ${{ matrix.php }}
20+
coverage: none
21+
22+
- run: composer install --no-progress --prefer-dist
23+
- run: composer tester
24+
- if: failure()
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: output-${{ matrix.php }}
28+
path: tests/**/output

0 commit comments

Comments
 (0)