Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,29 @@ on: [push]
jobs:
build-test:
runs-on: ubuntu-latest
container:
image: php:8.4 # This forces the job to run in a Docker container

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install System Dependencies (Git, Zip, Unzip)
run: |
apt-get update
apt-get install -y unzip git zip

- name: Install and Enable extensions
run: |
docker-php-ext-install sockets calendar
docker-php-ext-enable sockets calendar

- name: Install Composer
run: |
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
composer --version
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
extensions: sockets, calendar, pcov
coverage: pcov

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

- name: Run PHPUnit
run: vendor/bin/phpunit tests
run: composer install --prefer-dist --no-progress --no-interaction --optimize-autoloader

- name: Run PHPUnit with Coverage
run: vendor/bin/phpunit tests --coverage-clover coverage.xml --coverage-filter src

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: cms
slug: Neuron-PHP/cms
fail_ci_if_error: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ cache.properties
composer.lock
.phpunit.result.cache
examples/test.log

coverage.xml
Loading