Skip to content

Commit 51af981

Browse files
authored
Fix Codecov GitHub Action warning due to too low fetch depth (#1188)
1 parent 62f6897 commit 51af981

File tree

6 files changed

+148
-143
lines changed

6 files changed

+148
-143
lines changed

.craft.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
minVersion: '0.9.0'
1+
minVersion: 0.9.0
22
github:
3-
owner: getsentry
4-
repo: sentry-php
3+
owner: getsentry
4+
repo: sentry-php
55
changelogPolicy: simple
6-
statusProvider:
7-
name: github
6+
statusProvider:
7+
name: github
88
artifactProvider:
99
name: none
1010
preReleaseCommand: ""
1111
targets:
12-
- name: github
13-
- name: registry
14-
type: sdk
15-
config:
16-
canonical: 'composer:sentry/sentry'
12+
- name: github
13+
- name: registry
14+
type: sdk
15+
config:
16+
canonical: 'composer:sentry/sentry'

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ indent_size = 4
1313
[*.md]
1414
max_line_length = 80
1515

16+
[*.{yml, yaml}]
17+
indent_size = 2
18+
1619
[COMMIT_EDITMSG]
1720
max_line_length = 0

.github/workflows/ci.yaml

+55-53
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,69 @@
11
name: CI
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- master
8-
- develop
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- develop
99

1010
jobs:
11-
tests:
12-
name: Tests
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
os:
18-
- ubuntu-latest
19-
- windows-latest
20-
php:
21-
- '7.2'
22-
- '7.3'
23-
- '7.4'
24-
- '8.0'
25-
dependencies:
26-
- lowest
27-
- highest
11+
tests:
12+
name: Tests
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os:
18+
- ubuntu-latest
19+
- windows-latest
20+
php:
21+
- '7.2'
22+
- '7.3'
23+
- '7.4'
24+
- '8.0'
25+
dependencies:
26+
- lowest
27+
- highest
2828

29-
steps:
30-
- name: Checkout
31-
uses: actions/checkout@v2
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
with:
33+
fetch-depth: 2
3234

33-
- name: Setup PHP
34-
uses: shivammathur/setup-php@v2
35-
with:
36-
php-version: ${{ matrix.php }}
37-
coverage: xdebug
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php }}
39+
coverage: xdebug
3840

39-
- name: Setup Problem Matchers for PHPUnit
40-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
41+
- name: Setup Problem Matchers for PHPUnit
42+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
4143

42-
- name: Determine Composer cache directory
43-
id: composer-cache
44-
run: echo "::set-output name=directory::$(composer config cache-dir)"
44+
- name: Determine Composer cache directory
45+
id: composer-cache
46+
run: echo "::set-output name=directory::$(composer config cache-dir)"
4547

46-
- name: Cache Composer dependencies
47-
uses: actions/cache@v2
48-
with:
49-
path: ${{ steps.composer-cache.outputs.directory }}
50-
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
51-
restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.dependencies }}-composer-
48+
- name: Cache Composer dependencies
49+
uses: actions/cache@v2
50+
with:
51+
path: ${{ steps.composer-cache.outputs.directory }}
52+
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
53+
restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.dependencies }}-composer-
5254

53-
- name: Install highest dependencies
54-
run: composer update --no-progress --no-interaction --prefer-dist
55-
if: ${{ matrix.dependencies == 'highest' }}
55+
- name: Install highest dependencies
56+
run: composer update --no-progress --no-interaction --prefer-dist
57+
if: ${{ matrix.dependencies == 'highest' }}
5658

57-
- name: Install lowest dependencies
58-
run: composer update --no-progress --no-interaction --prefer-dist --prefer-lowest
59-
if: ${{ matrix.dependencies == 'lowest' }}
59+
- name: Install lowest dependencies
60+
run: composer update --no-progress --no-interaction --prefer-dist --prefer-lowest
61+
if: ${{ matrix.dependencies == 'lowest' }}
6062

61-
- name: Run tests
62-
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
63+
- name: Run tests
64+
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
6365

64-
- name: Upload code coverage
65-
uses: codecov/codecov-action@v1
66-
with:
67-
file: build/coverage-report.xml
66+
- name: Upload code coverage
67+
uses: codecov/codecov-action@v1
68+
with:
69+
file: build/coverage-report.xml
+23-23
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
name: Prepare Release
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
version:
7-
description: Version to release
8-
required: true
9-
force:
10-
description: Force a release even when there are release-blockers (optional)
11-
required: false
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Version to release
8+
required: true
9+
force:
10+
description: Force a release even when there are release-blockers (optional)
11+
required: false
1212

1313
jobs:
14-
release:
15-
runs-on: ubuntu-latest
16-
name: Release version
17-
steps:
18-
- uses: actions/checkout@v2
19-
with:
20-
token: ${{ secrets.GH_RELEASE_PAT }}
21-
fetch-depth: 0
14+
release:
15+
runs-on: ubuntu-latest
16+
name: Release version
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
token: ${{ secrets.GH_RELEASE_PAT }}
21+
fetch-depth: 0
2222

23-
- name: Prepare release
24-
uses: getsentry/action-prepare-release@v1
25-
env:
26-
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
27-
with:
28-
version: ${{ github.event.inputs.version }}
29-
force: ${{ github.event.inputs.force }}
23+
- name: Prepare release
24+
uses: getsentry/action-prepare-release@v1
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
27+
with:
28+
version: ${{ github.event.inputs.version }}
29+
force: ${{ github.event.inputs.force }}
+54-54
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
name: Code style and static analysis
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- master
8-
- develop
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- develop
99

1010
jobs:
11-
php-cs-fixer:
12-
name: PHP-CS-Fixer
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v2
17-
18-
- name: Setup PHP
19-
uses: shivammathur/setup-php@v2
20-
with:
21-
php-version: '7.4'
22-
23-
- name: Install dependencies
24-
run: composer update --no-progress --no-interaction --prefer-dist
25-
26-
- name: Run script
27-
run: composer phpcs
28-
29-
phpstan:
30-
name: PHPStan
31-
runs-on: ubuntu-latest
32-
steps:
33-
- name: Checkout
34-
uses: actions/checkout@v2
35-
36-
- name: Setup PHP
37-
uses: shivammathur/setup-php@v2
38-
39-
- name: Install dependencies
40-
run: composer update --no-progress --no-interaction --prefer-dist
41-
42-
- name: Run script
43-
run: composer phpstan
44-
45-
psalm:
46-
name: Psalm
47-
runs-on: ubuntu-latest
48-
steps:
49-
- name: Checkout
50-
uses: actions/checkout@v2
51-
52-
- name: Setup PHP
53-
uses: shivammathur/setup-php@v2
54-
55-
- name: Install dependencies
56-
run: composer update --no-progress --no-interaction --prefer-dist
57-
58-
- name: Run script
59-
run: composer psalm
11+
php-cs-fixer:
12+
name: PHP-CS-Fixer
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '7.4'
22+
23+
- name: Install dependencies
24+
run: composer update --no-progress --no-interaction --prefer-dist
25+
26+
- name: Run script
27+
run: composer phpcs
28+
29+
phpstan:
30+
name: PHPStan
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v2
35+
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
39+
- name: Install dependencies
40+
run: composer update --no-progress --no-interaction --prefer-dist
41+
42+
- name: Run script
43+
run: composer phpstan
44+
45+
psalm:
46+
name: Psalm
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v2
51+
52+
- name: Setup PHP
53+
uses: shivammathur/setup-php@v2
54+
55+
- name: Install dependencies
56+
run: composer update --no-progress --no-interaction --prefer-dist
57+
58+
- name: Run script
59+
run: composer psalm

codecov.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
comment: false
22
ignore:
3-
- tests/data
4-
- tests/resources
5-
- tests/Fixtures
3+
- tests/data
4+
- tests/resources
5+
- tests/Fixtures

0 commit comments

Comments
 (0)