Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit de12315

Browse files
authored
Merge pull request #62 from timirey/hotfix/remove-is-connected-method-from-sc
Update workflows
2 parents 3953098 + 16c2c7a commit de12315

File tree

3 files changed

+63
-54
lines changed

3 files changed

+63
-54
lines changed

.github/workflows/pull-request.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
name: pull request
22

33
on:
4-
pull_request:
5-
types:
6-
- opened
7-
- synchronize
8-
- reopened
9-
branches:
10-
- dev
11-
- main
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
branches:
10+
- dev
11+
- main
1212

1313
jobs:
14-
check-pull-request:
15-
runs-on: ubuntu-latest
14+
check-pull-request:
15+
runs-on: ubuntu-latest
1616

17-
steps:
18-
- name: Check branch prefix
19-
run: |
20-
BRANCH_NAME=${GITHUB_HEAD_REF}
21-
TARGET_BRANCH=${GITHUB_BASE_REF}
17+
steps:
18+
- name: Check branch prefix
19+
run: |
20+
BRANCH_NAME=${GITHUB_HEAD_REF}
21+
TARGET_BRANCH=${GITHUB_BASE_REF}
2222
23-
if [[ "$TARGET_BRANCH" == "dev" ]]; then
24-
if [[ "$BRANCH_NAME" =~ ^feature/|^release/|^hotfix/ ]]; then
25-
echo "Branch name is valid for dev."
26-
else
27-
echo "Error: Branch name for dev must start with 'feature/', 'release/', or 'hotfix/'."
28-
exit 1
29-
fi
30-
elif [[ "$TARGET_BRANCH" == "main" ]]; then
31-
if [[ "$BRANCH_NAME" =~ ^release/|^hotfix/ ]]; then
32-
echo "Branch name is valid for main."
33-
else
34-
echo "Error: Branch name for main must start with 'release/' or 'hotfix/'."
35-
exit 1
36-
fi
37-
else
38-
echo "Error: Unsupported target branch."
39-
exit 1
40-
fi
23+
if [[ "$TARGET_BRANCH" == "dev" ]]; then
24+
if [[ "$BRANCH_NAME" =~ ^feature/|^release/|^hotfix/ ]]; then
25+
echo "Branch name is valid for dev."
26+
else
27+
echo "Error: Branch name for dev must start with 'feature/', 'release/', or 'hotfix/'."
28+
exit 1
29+
fi
30+
elif [[ "$TARGET_BRANCH" == "main" ]]; then
31+
if [[ "$BRANCH_NAME" =~ ^release/|^hotfix/ ]]; then
32+
echo "Branch name is valid for main."
33+
else
34+
echo "Error: Branch name for main must start with 'release/' or 'hotfix/'."
35+
exit 1
36+
fi
37+
else
38+
echo "Error: Unsupported target branch."
39+
exit 1
40+
fi

.github/workflows/tests.yml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
11
name: tests
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- dev
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
types:
10+
- opened
11+
- synchronize
12+
- reopened
13+
branches:
14+
- dev
15+
- main
816

917
jobs:
10-
check-tests:
11-
runs-on: ubuntu-latest
18+
check-tests:
19+
runs-on: ubuntu-latest
1220

13-
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v4
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
1624

17-
- name: Setup PHP
18-
uses: shivammathur/setup-php@v2
19-
with:
20-
php-version: 8.3
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: 8.3
2129

22-
- name: Install Dependencies
23-
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
30+
- name: Install Dependencies
31+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
2432

25-
- name: Run PHP CodeSniffer
26-
run: vendor/bin/phpcs --severity=6
33+
- name: Run PHP CodeSniffer
34+
run: vendor/bin/phpcs --severity=6
2735

28-
- name: Run PHP Stan
29-
run: vendor/bin/phpstan analyse src --level=8
36+
- name: Run PHP Stan
37+
run: vendor/bin/phpstan analyse src --level=8
3038

31-
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
32-
run: vendor/bin/pest
39+
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
40+
run: vendor/bin/pest

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [6.0.3](https://github.com/timirey/xapi-php/compare/6.0.2..6.0.3) - 2024-07-30
44

55
- Remove `isConnected()` from `SocketConnection::class`.
6+
- Updated GitHub workflows for better checks.
67

78
## [6.0.2](https://github.com/timirey/xapi-php/compare/6.0.1..6.0.2) - 2024-07-30
89

0 commit comments

Comments
 (0)