Skip to content

Commit

Permalink
adding workflow and adding dummy test
Browse files Browse the repository at this point in the history
  • Loading branch information
nephifey committed Apr 27, 2024
1 parent 2625e19 commit 347bd27
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/php-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: php-ci

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist

- name: Run PHPUnit tests
run: vendor/bin/phpunit tests

phpstan:
name: PHPStan
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist

- name: Run PHPStan static analysis
run: vendor/bin/phpstan analyse --level=max --no-progress
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"autoload-dev": {
"psr-4": {
"Nephifey\\Tests\\SvnMigrate\\": "tests"
"Nephifey\\SvnMigrate\\Tests": "tests"
}
},
"bin": [
Expand Down
20 changes: 20 additions & 0 deletions tests/ExampleTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/*
* This file is part of nephifey/svn-migrate.
*
* (c) Nathan Phifer <nephifer5@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Nephifey\SvnMigrate\Tests;

use PHPUnit\Framework\TestCase;

class ExampleTest extends TestCase {

public function testMe() {
$this->assertTrue(true);
}
}

0 comments on commit 347bd27

Please sign in to comment.