Skip to content

Commit

Permalink
Try different file structure for PHP; add "archive.exclude" (#124)
Browse files Browse the repository at this point in the history
* Try different file structure for PHP; add "archive.exclude"

* fix: path

* Update "archive.exclude"

* Update coverage path (test)

* Testing coverage

* Ignore more files in "archive.exclude"
  • Loading branch information
dmythro authored Aug 11, 2023
1 parent d52543b commit 34c51bc
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 24 deletions.
1 change: 0 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- '.github/workflows/nodejs.yml'
- 'packages/countries/src/**'
- '!.editorconfig'
- '!.travis.yml'
- '!**LICENSE*'
- '!**README*'

Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ on:
- main
paths:
- '.github/workflows/phpunit.yml'
- 'dist/**.json'
- 'dist/*.php'
- 'packages/countries/data/**'
- 'packages/countries/src/data/**'
- 'packages/test-php/**'
- 'phpunit.xml'
- '!.editorconfig'
- '!.travis.yml'
- '!**LICENSE*'
- '!**README*'

Expand All @@ -32,5 +28,8 @@ jobs:
uses: php-actions/phpunit@v3
with:
version: 9
configuration: phpunit.xml
php_extensions: xdebug
configuration: packages/test-php/phpunit.xml
args: --coverage-text
env:
XDEBUG_MODE: coverage
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Continents & countries: **ISO 3166-1 alpha-2** code (with **alpha-2** to **alpha
Lists are available in JSON, CSV and SQL formats.
Also, contains separate JSON files with additional country **Emoji** flags data.

## Version 3.0: Breaking changes

Version 3 comes with some data structure changes. Also, it was completely reworked with TypeScript, ESM exports and Turborepo file structure.

## Version 2.0: Breaking changes

This version changes a lot in the data structures, and placement of the files.
Expand Down
24 changes: 16 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
"json",
"sql",
"ISO 3166-1",
"ISO 639-1",
"node",
"typescript"
"ISO 639-1"
],
"authors": [
{
Expand All @@ -35,11 +33,21 @@
"require": {},
"autoload": {
"files": [
"index.php"
"dist/index.php"
]
},
"homepage": "http://annexare.github.io/Countries/",
"require-dev": {
"phpunit/phpunit": "^9.5"
}
"archive": {
"exclude": [
".npmignore",
"*.js",
"*.map",
"*.mjs",
"*.ts",
"/.*",
"/packages",
"package*.json",
"turbo.json"
]
},
"homepage": "http://annexare.github.io/Countries/"
}
6 changes: 3 additions & 3 deletions phpunit.xml → packages/test-php/phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
bootstrap="dist/index.php"
bootstrap="../../dist/index.php"
cacheResultFile=".phpunit.cache/test-results"
executionOrder="depends,defects"
beStrictAboutCoversAnnotation="true"
Expand All @@ -12,14 +12,14 @@
verbose="true">
<testsuites>
<testsuite name="default">
<directory>packages/test-php</directory>
<directory>.</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory=".phpunit.cache/code-coverage"
processUncoveredFiles="true">
<include>
<directory suffix=".php">dist</directory>
<directory suffix=".php">../../dist</directory>
</include>
</coverage>
</phpunit>

0 comments on commit 34c51bc

Please sign in to comment.