Skip to content

Commit

Permalink
Merge pull request #3 from fr3nch13/dev
Browse files Browse the repository at this point in the history
Changing the regex to find the active branch name.
  • Loading branch information
fr3nch13 authored Feb 25, 2023
2 parents 14c0d6e + 1f07076 commit c1541a2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Composer install
run: composer install
run: |
composer config github-oauth.github.com ${{ secrets.ACTIONS_TOKEN }}
composer install
- name: Run PHP CodeSniffer
run: composer run-script cs-checkstyle | vendor/bin/cs2pr
Expand All @@ -60,7 +62,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Composer install
run: composer install
run: |
composer config github-oauth.github.com ${{ secrets.ACTIONS_TOKEN }}
composer install
- name: Run PHP Analyzer
run: composer run-script phpstan
Expand All @@ -87,7 +91,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Composer install
run: composer install
run: |
composer config github-oauth.github.com ${{ secrets.ACTIONS_TOKEN }}
composer install
- name: Run PHPUnit
run: composer run-script test
Expand All @@ -114,13 +120,15 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Composer install
run: composer install
run: |
composer config github-oauth.github.com ${{ secrets.ACTIONS_TOKEN }}
composer install
- name: Run PHPUnit
run: composer run-script coverage-clover

- name: Upload to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./tmp/coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/View/Helper/VersionsHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function testRunGit(): void
{
$results = $this->Versions->runGit(['branch']);
if (count($results) == 1) {
$this->assertMatchesRegularExpression('/^\*\s+\(main|master|HEAD\s+detached\s+at\s+[a-z0-9\/]+\)$/i', $results[0]);
$this->assertMatchesRegularExpression('/^\*\s+([\(\)\w\s\/]+)$/i', $results[0]);
} else {
$result = '';
foreach ($results as $i => $line) {
Expand Down

0 comments on commit c1541a2

Please sign in to comment.