Skip to content

Commit

Permalink
Merge pull request #28 from WebFiori/dev
Browse files Browse the repository at this point in the history
Refactoring
  • Loading branch information
usernane authored Dec 22, 2024
2 parents badb725 + 247c967 commit be71f77
Show file tree
Hide file tree
Showing 20 changed files with 155 additions and 268 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/.travis.yml export-ignore
/phpunit.xml export-ignore
/sonar-project.properties export-ignore
/CHANGELOG.md
41 changes: 0 additions & 41 deletions .github/workflows/php71.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/php72.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/php73.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/php74.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/php80.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Clone Repo
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -35,7 +35,7 @@ jobs:
run: composer install --prefer-dist --no-interaction

- name: Execute Tests
run: phpunit
run: phpunit --configuration tests/phpunit.xml

- name: CodeCov
uses: codecov/codecov-action@v4
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/php81.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Clone Repo
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -34,15 +34,9 @@ jobs:
run: composer install --prefer-dist --no-interaction

- name: Execute Tests
run: phpunit
run: phpunit --configuration tests/phpunit.xml

- name: CodeCov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: SonarCloud
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6 changes: 2 additions & 4 deletions .github/workflows/php82.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Clone Repo
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -29,14 +29,12 @@ jobs:
extensions: mysqli, mbstring, sqlsrv
tools: phpunit:9.5.20, composer

- name: Shutdown Ubuntu MySQL
run: sudo service mysql stop

- name: Install Dependencies
run: composer install --prefer-dist --no-interaction

- name: Execute Tests
run: phpunit
run: phpunit --configuration tests/phpunit.xml

- name: CodeCov
uses: codecov/codecov-action@v4
Expand Down
41 changes: 31 additions & 10 deletions .github/workflows/php83.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main ]
branches: [ main, dev ]

jobs:

test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
Expand All @@ -20,25 +21,45 @@ jobs:

steps:
- name: Clone Repo
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mysqli, mbstring, sqlsrv
tools: phpunit:9.5.20, composer
tools: phpunit:9.5.20, composer, symplify/easy-coding-standard:12.0.6, phpbench/phpbench:1.2.14

- name: Shutdown Ubuntu MySQL
run: sudo service mysql stop

- name: Install Dependencies
run: composer install --prefer-dist --no-interaction
run: composer install --prefer-dist --no-interaction --no-dev

- name: Execute Tests
run: phpunit
run: phpunit --configuration tests/phpunit.xml

- name: CodeCov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: SonarCloud Code Scan
uses: sonarsource/sonarqube-scan-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}


release_prod:
name: Prepare Production Release Branch / Publish Release
needs:
- "test"
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: google-github-actions/release-please-action@v3
with:
release-type: php
config-file: release-please-config.json
token: ${{ secrets.GITHUB_TOKEN }}


21 changes: 12 additions & 9 deletions .github/workflows/php70.yml → .github/workflows/php84.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
name: Build PHP 7.0
name: Build PHP 8.4

on:
push:
branches: [ main ]
branches: [ main, dev ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [7.0]
php: [8.4]

name: PHP${{matrix.php}} - ${{matrix.os}}

steps:
- name: Clone Repo
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mysqli, mbstring, sqlsrv
tools: phpunit:5.7.27, composer
tools: phpunit:9.5.20, composer

- name: Shutdown Ubuntu MySQL
run: sudo service mysql stop

- name: Install Dependencies
run: composer install --prefer-dist --no-interaction

- name: Execute Tests
run: phpunit
run: phpunit --configuration tests/phpunit.xml

- name: CodeCov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ php-cs-fixer-v2.phar
.idea/*
php-cs-fixer.phar
clover.xml
*.bin
tests/files/not-exist/new.txt
tests/webfiori/framework/test/testUpload.txt
Loading

0 comments on commit be71f77

Please sign in to comment.