mirror of
https://github.com/flarum/core.git
synced 2025-08-07 17:07:19 +02:00
Run flarum-cli audit infra
This commit is contained in:
@@ -15,5 +15,5 @@ indent_size = 2
|
|||||||
[*.{diff,md}]
|
[*.{diff,md}]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.php]
|
[*.{php,xml,json}]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
13
extensions/akismet/.gitattributes
vendored
13
extensions/akismet/.gitattributes
vendored
@@ -1,5 +1,18 @@
|
|||||||
.gitattributes export-ignore
|
.gitattributes export-ignore
|
||||||
.gitignore export-ignore
|
.gitignore export-ignore
|
||||||
|
.gitmodules export-ignore
|
||||||
|
.github export-ignore
|
||||||
|
.travis export-ignore
|
||||||
.travis.yml export-ignore
|
.travis.yml export-ignore
|
||||||
|
.editorconfig export-ignore
|
||||||
|
.styleci.yml export-ignore
|
||||||
|
|
||||||
|
phpunit.xml export-ignore
|
||||||
|
tests export-ignore
|
||||||
|
|
||||||
js/dist/* -diff
|
js/dist/* -diff
|
||||||
|
js/dist/* linguist-generated
|
||||||
|
js/dist-typings/* linguist-generated
|
||||||
|
js/yarn.lock -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
||||||
|
15
extensions/akismet/.github/workflows/backend.yml
vendored
Normal file
15
extensions/akismet/.github/workflows/backend.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
name: Akismet PHP
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
||||||
|
# This will break your current script.
|
||||||
|
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
||||||
|
with:
|
||||||
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
backend_directory: .
|
17
extensions/akismet/.github/workflows/build.yml
vendored
17
extensions/akismet/.github/workflows/build.yml
vendored
@@ -1,17 +0,0 @@
|
|||||||
name: Build JavaScript assets
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- uses: flarum/action-build@master
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
20
extensions/akismet/.github/workflows/frontend.yml
vendored
Normal file
20
extensions/akismet/.github/workflows/frontend.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: Akismet JS
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
||||||
|
# This will break your current script.
|
||||||
|
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
||||||
|
with:
|
||||||
|
enable_bundlewatch: false
|
||||||
|
enable_prettier: true
|
||||||
|
enable_typescript: true
|
||||||
|
|
||||||
|
frontend_directory: ./js
|
||||||
|
main_git_branch: main
|
||||||
|
secrets:
|
||||||
|
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
12
extensions/akismet/.gitignore
vendored
12
extensions/akismet/.gitignore
vendored
@@ -1,8 +1,12 @@
|
|||||||
.idea
|
|
||||||
/vendor
|
/vendor
|
||||||
|
composer.lock
|
||||||
composer.phar
|
composer.phar
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
node_modules
|
tests/.phpunit.result.cache
|
||||||
js/dist/*
|
/tests/integration/tmp
|
||||||
composer.lock
|
.vagrant
|
||||||
|
.idea/*
|
||||||
|
.vscode
|
||||||
|
js/coverage-ts
|
||||||
|
@@ -41,6 +41,38 @@
|
|||||||
"backgroundColor": "#5e8e14",
|
"backgroundColor": "#5e8e14",
|
||||||
"color": "#fff"
|
"color": "#fff"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"flarum-cli": {
|
||||||
|
"modules": {
|
||||||
|
"js": true,
|
||||||
|
"jsCommon": false,
|
||||||
|
"gitConf": true,
|
||||||
|
"githubActions": true,
|
||||||
|
"prettier": true,
|
||||||
|
"typescript": true,
|
||||||
|
"bundlewatch": false,
|
||||||
|
"backendTesting": true,
|
||||||
|
"editorConfig": true,
|
||||||
|
"styleci": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"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": {
|
||||||
|
"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."
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"flarum/testing": "^1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
9
extensions/akismet/js/.gitignore
vendored
Normal file
9
extensions/akismet/js/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
.pnp.*
|
||||||
|
.yarn/*
|
||||||
|
!.yarn/patches
|
||||||
|
!.yarn/plugins
|
||||||
|
!.yarn/releases
|
||||||
|
!.yarn/sdks
|
||||||
|
!.yarn/versions
|
||||||
|
|
||||||
|
node_modules
|
@@ -1,19 +1,29 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "@flarum/akismet",
|
"name": "@flarum/akismet",
|
||||||
"prettier": "@flarum/prettier-config",
|
"prettier": "@flarum/prettier-config",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"flarum-webpack-config": "^1.0.0",
|
"flarum-webpack-config": "^1.0.0",
|
||||||
"webpack": "^4.46.0",
|
"webpack": "^4.46.0",
|
||||||
"webpack-cli": "^4.9.1"
|
"webpack-cli": "^4.9.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack --mode development --watch",
|
"dev": "webpack --mode development --watch",
|
||||||
"build": "webpack --mode production"
|
"build": "webpack --mode production",
|
||||||
},
|
"analyze": "cross-env ANALYZER=true yarn build",
|
||||||
"devDependencies": {
|
"format": "prettier --write src",
|
||||||
"@flarum/prettier-config": "^1.0.0",
|
"format-check": "prettier --check src",
|
||||||
"flarum-tsconfig": "^1.0.2",
|
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
||||||
"prettier": "^2.5.1"
|
"check-typings-coverage": "typescript-coverage-report"
|
||||||
}
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@flarum/prettier-config": "^1.0.0",
|
||||||
|
"flarum-tsconfig": "^1.0.2",
|
||||||
|
"prettier": "^2.5.1",
|
||||||
|
"flarum-webpack-config": "^2.0.0",
|
||||||
|
"webpack": "^5.65.0",
|
||||||
|
"webpack-cli": "^4.9.1",
|
||||||
|
"typescript": "^4.5.4",
|
||||||
|
"typescript-coverage-report": "^0.6.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,12 @@
|
|||||||
{
|
{
|
||||||
|
// Use Flarum's tsconfig as a starting point
|
||||||
"extends": "flarum-tsconfig",
|
"extends": "flarum-tsconfig",
|
||||||
"include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*"],
|
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
||||||
|
// and also tells your Typescript server to read core's global typings for
|
||||||
|
// access to `dayjs` and `$` in the global namespace.
|
||||||
|
"include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*", "@types/**/*"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
// This will output typings to `dist-typings`
|
||||||
"declarationDir": "./dist-typings",
|
"declarationDir": "./dist-typings",
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
|
@@ -1,3 +1 @@
|
|||||||
const config = require('flarum-webpack-config');
|
module.exports = require('flarum-webpack-config')();
|
||||||
|
|
||||||
module.exports = config();
|
|
||||||
|
13
extensions/akismet/node_modules/.yarn-integrity
generated
vendored
Normal file
13
extensions/akismet/node_modules/.yarn-integrity
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"systemParams": "linux-x64-93",
|
||||||
|
"modulesFolders": [],
|
||||||
|
"flags": [],
|
||||||
|
"linkedModules": [
|
||||||
|
"flarum-webpack-config",
|
||||||
|
"mem-fs"
|
||||||
|
],
|
||||||
|
"topLevelPatterns": [],
|
||||||
|
"lockfileEntries": {},
|
||||||
|
"files": [],
|
||||||
|
"artifacts": {}
|
||||||
|
}
|
0
extensions/akismet/tests/fixtures/.gitkeep
vendored
Normal file
0
extensions/akismet/tests/fixtures/.gitkeep
vendored
Normal file
16
extensions/akismet/tests/integration/setup.php
Normal file
16
extensions/akismet/tests/integration/setup.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Flarum\Testing\integration\Setup\SetupScript;
|
||||||
|
|
||||||
|
require __DIR__.'/../../vendor/autoload.php';
|
||||||
|
|
||||||
|
$setup = new SetupScript();
|
||||||
|
|
||||||
|
$setup->run();
|
24
extensions/akismet/tests/phpunit.integration.xml
Normal file
24
extensions/akismet/tests/phpunit.integration.xml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
||||||
|
backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="true"
|
||||||
|
stopOnFailure="false"
|
||||||
|
>
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../src/</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Flarum Integration Tests">
|
||||||
|
<directory suffix="Test.php">./integration</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
</phpunit>
|
27
extensions/akismet/tests/phpunit.unit.xml
Normal file
27
extensions/akismet/tests/phpunit.unit.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
||||||
|
backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
>
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../src/</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Flarum Unit Tests">
|
||||||
|
<directory suffix="Test.php">./unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<listeners>
|
||||||
|
<listener class="\Mockery\Adapter\Phpunit\TestListener" />
|
||||||
|
</listeners>
|
||||||
|
</phpunit>
|
0
extensions/akismet/tests/unit/.gitkeep
Normal file
0
extensions/akismet/tests/unit/.gitkeep
Normal file
Reference in New Issue
Block a user