Skip to content

Commit

Permalink
chore: enable phpstan, use flarum/testing (#25)
Browse files Browse the repository at this point in the history
* chore: enable phpstan, use flarum/testing

* chore: bump js deps
  • Loading branch information
imorland committed Nov 12, 2023
1 parent b04f7ca commit fe049b1
Show file tree
Hide file tree
Showing 15 changed files with 659 additions and 597 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: FoF Amazon Affiliation PHP

on: [workflow_dispatch, push, pull_request]

jobs:
run:
uses: flarum/framework/.github/workflows/REUSABLE_backend.yml@main
with:
enable_backend_testing: true
enable_phpstan: true

backend_directory: .
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Javascript
name: FoF Amazon Affiliation JS

on: [workflow_dispatch, push, pull_request]

Expand All @@ -8,7 +8,7 @@ jobs:
with:
enable_bundlewatch: false
enable_prettier: true
enable_typescript: false
enable_typescript: true

frontend_directory: ./js
backend_directory: .
Expand Down
34 changes: 32 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"flarum/core": "^1.2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.3.3"
"flarum/phpstan": "*",
"flarum/testing": "^1.0.0"
},
"replace": {
"flagrow/amazon-affiliation": "*"
Expand Down Expand Up @@ -60,11 +61,40 @@
"color": "#fff"
},
"optional-dependencies": [
"fof/formatting"
"fof/formatting"
]
},
"flagrow": {
"discuss": "https://discuss.flarum.org/d/12389"
},
"flarum-cli": {
"modules": {
"githubActions": true,
"backendTesting": true
}
}
},
"scripts": {
"analyse:phpstan": "phpstan analyse",
"clear-cache:phpstan": "phpstan clear-result-cache",
"test": [
"@test:unit",
"@test:integration"
],
"test:unit": "phpunit -c tests/phpunit.unit.xml",
"test:integration": "phpunit -c tests/phpunit.integration.xml",
"test:setup": "@php tests/integration/setup.php"
},
"scripts-descriptions": {
"analyse:phpstan": "Run static analysis",
"test": "Runs all tests.",
"test:unit": "Runs all unit tests.",
"test:integration": "Runs all integration tests.",
"test:setup": "Sets up a database for use with integration tests. Execute this only once."
},
"autoload-dev": {
"psr-4": {
"FoF\\AmazonAffiliation\\Tests\\": "tests/"
}
}
}
2 changes: 1 addition & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
// $params['AMAZON_ASSOCIATE_TAG_MX'] = $settings->get($prefix.'com.mx', '');
// $params['AMAZON_ASSOCIATE_TAG_AU'] = $settings->get($prefix.'com.au', '');

extract($configurator->finalize());
//extract($configurator->finalize());
}),
];
Loading

0 comments on commit fe049b1

Please sign in to comment.