Skip to content

Commit d20d9aa

Browse files
committed
Test workflow in 1 file
1 parent 2e64ada commit d20d9aa

File tree

4 files changed

+56
-2
lines changed

4 files changed

+56
-2
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ insert_final_newline = true
77
charset = utf-8
88
indent_style = space
99
indent_size = 4
10+
11+
[{*.yml, *.yaml}]
12+
indent_size = 2

.github/workflows/codecov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
files: ./coverage.xml
3030
verbose: true
3131
env:
32-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
32+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/psalm.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
run: composer install -n --prefer-dist
2626

2727
- name: Run psalm
28-
run: ./vendor/bin/psalm --shepherd --threads=2 --no-cache --output-format=github
28+
run: ./vendor/bin/psalm --shepherd --threads=2 --no-cache --output-format=github

.github/workflows/workflow.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Complete Workflow
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
run:
7+
name: psalm
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Actions
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup PHP
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: '8.2'
18+
# coverage: none
19+
20+
- name: Setup Composer
21+
- uses: php-actions/composer@v6
22+
23+
- name: Cache composer dependencies
24+
uses: actions/cache@v2
25+
with:
26+
path: vendor
27+
key: composer-${{ hashFiles('composer.lock') }}
28+
29+
- name: Run composer install
30+
run: composer install -n --prefer-dist
31+
32+
- name: Run psalm
33+
run: ./vendor/bin/psalm --shepherd --threads=2 --no-cache --output-format=github
34+
35+
- name: PHPUnit Tests
36+
uses: php-actions/phpunit@v3
37+
env:
38+
XDEBUG_MODE: coverage
39+
with:
40+
bootstrap: vendor/autoload.php
41+
configuration: phpunit.xml
42+
php_extensions: xdebug
43+
args: tests --coverage-clover ./coverage.xml
44+
45+
- name: Upload coverage to Codecov
46+
uses: codecov/[email protected]
47+
with:
48+
files: ./coverage.xml
49+
verbose: true
50+
env:
51+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)