mirror of
https://github.com/cosmocode/dokuwiki-plugin-prosemirror.git
synced 2025-07-26 15:51:09 +00:00
run release process on github
This commit is contained in:
42
.github/workflows/deployRelease.yml
vendored
Normal file
42
.github/workflows/deployRelease.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: Deploy Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["PHP Tests on Linux"]
|
||||||
|
branches: [master]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout 🛎️
|
||||||
|
uses: actions/checkout@v2.3.1
|
||||||
|
|
||||||
|
- name: Install and Build 🔧
|
||||||
|
run: |
|
||||||
|
yarn install
|
||||||
|
yarn build
|
||||||
|
rm -rf .babelrc
|
||||||
|
rm -rf .eslintrc.js
|
||||||
|
rm -rf .github
|
||||||
|
rm -rf .gitignore
|
||||||
|
rm -rf .travis.yml
|
||||||
|
rm -rf _jstest
|
||||||
|
rm -rf _test
|
||||||
|
rm -rf node_modules
|
||||||
|
rm -rf package.json
|
||||||
|
rm -rf pre-commit.hook.sh
|
||||||
|
rm -rf requirements.txt
|
||||||
|
rm -rf script
|
||||||
|
rm -rf stylelint.config.js
|
||||||
|
rm -rf webpack.config.js
|
||||||
|
rm -rf yarn.lock
|
||||||
|
|
||||||
|
- name: Deploy 🚀
|
||||||
|
uses: JamesIves/github-pages-deploy-action@4.1.4
|
||||||
|
with:
|
||||||
|
branch: release
|
||||||
|
folder: .
|
52
.github/workflows/phpTestLinux.yml
vendored
Normal file
52
.github/workflows/phpTestLinux.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: PHP Tests on Linux
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
testLinux:
|
||||||
|
name: PHP ${{ matrix.php-versions }} DokuWiki ${{ matrix.dokuwiki-branch }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.2', '7.3', '7.4', '8.0']
|
||||||
|
dokuwiki-branch: [ 'stable' ]
|
||||||
|
exclude:
|
||||||
|
- dokuwiki-branch: 'stable'
|
||||||
|
php-versions: '8.0'
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: mbstring, intl, PDO, pdo_sqlite, bz2
|
||||||
|
|
||||||
|
- name: Setup problem matchers
|
||||||
|
run: |
|
||||||
|
echo ::add-matcher::${{ runner.tool_cache }}/php.json
|
||||||
|
echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json
|
||||||
|
|
||||||
|
- name: Download DokuWiki Test-setup
|
||||||
|
run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
|
||||||
|
|
||||||
|
- name: Run DokuWiki Test-setup
|
||||||
|
env:
|
||||||
|
CI_SERVER: 1
|
||||||
|
DOKUWIKI: ${{ matrix.dokuwiki-branch }}
|
||||||
|
run: sh travis.sh
|
||||||
|
|
||||||
|
- name: Setup PHPUnit
|
||||||
|
run: |
|
||||||
|
php _test/fetchphpunit.php
|
||||||
|
cd _test
|
||||||
|
|
||||||
|
- name: Run PHPUnit
|
||||||
|
run: |
|
||||||
|
cd _test
|
||||||
|
php phpunit.phar --verbose --stderr --group plugin_prosemirror
|
@ -1,18 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace dokuwiki\plugin\prosemirror\test;
|
||||||
|
|
||||||
|
use DokuWikiTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* General tests for the prosemirror plugin
|
* General tests for the prosemirror plugin
|
||||||
*
|
*
|
||||||
* @group plugin_prosemirror
|
* @group plugin_prosemirror
|
||||||
* @group plugins
|
* @group plugins
|
||||||
*/
|
*/
|
||||||
class general_plugin_prosemirror_test extends DokuWikiTest
|
class GeneralTest extends DokuWikiTest
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple test to make sure the plugin.info.txt is in correct format
|
* Simple test to make sure the plugin.info.txt is in correct format
|
||||||
*/
|
*/
|
||||||
public function test_plugininfo()
|
public function testPluginInfo(): void
|
||||||
{
|
{
|
||||||
$file = __DIR__ . '/../plugin.info.txt';
|
$file = __DIR__ . '/../plugin.info.txt';
|
||||||
$this->assertFileExists($file);
|
$this->assertFileExists($file);
|
||||||
@ -38,29 +42,43 @@ class general_plugin_prosemirror_test extends DokuWikiTest
|
|||||||
* Test to ensure that every conf['...'] entry in conf/default.php has a corresponding meta['...'] entry in
|
* Test to ensure that every conf['...'] entry in conf/default.php has a corresponding meta['...'] entry in
|
||||||
* conf/metadata.php.
|
* conf/metadata.php.
|
||||||
*/
|
*/
|
||||||
public function test_plugin_conf()
|
public function testPluginConf(): void
|
||||||
{
|
{
|
||||||
$conf_file = __DIR__ . '/../conf/default.php';
|
$conf_file = __DIR__ . '/../conf/default.php';
|
||||||
|
$meta_file = __DIR__ . '/../conf/metadata.php';
|
||||||
|
|
||||||
|
if (!file_exists($conf_file) && !file_exists($meta_file)) {
|
||||||
|
self::markTestSkipped('No config files exist -> skipping test');
|
||||||
|
}
|
||||||
|
|
||||||
if (file_exists($conf_file)) {
|
if (file_exists($conf_file)) {
|
||||||
include($conf_file);
|
include($conf_file);
|
||||||
}
|
}
|
||||||
$meta_file = __DIR__ . '/../conf/metadata.php';
|
|
||||||
if (file_exists($meta_file)) {
|
if (file_exists($meta_file)) {
|
||||||
include($meta_file);
|
include($meta_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assertEquals(gettype($conf), gettype($meta),
|
$this->assertEquals(
|
||||||
'Both ' . DOKU_PLUGIN . 'prosemirror/conf/default.php and ' . DOKU_PLUGIN . 'prosemirror/conf/metadata.php have to exist and contain the same keys.');
|
gettype($conf),
|
||||||
|
gettype($meta),
|
||||||
|
'Both ' . DOKU_PLUGIN . 'prosemirror/conf/default.php and ' . DOKU_PLUGIN . 'prosemirror/conf/metadata.php have to exist and contain the same keys.'
|
||||||
|
);
|
||||||
|
|
||||||
if (gettype($conf) != 'NULL' && gettype($meta) != 'NULL') {
|
if ($conf !== null && $meta !== null) {
|
||||||
foreach ($conf as $key => $value) {
|
foreach ($conf as $key => $value) {
|
||||||
$this->assertArrayHasKey($key, $meta,
|
$this->assertArrayHasKey(
|
||||||
'Key $meta[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'prosemirror/conf/metadata.php');
|
$key,
|
||||||
|
$meta,
|
||||||
|
'Key $meta[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'prosemirror/conf/metadata.php'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($meta as $key => $value) {
|
foreach ($meta as $key => $value) {
|
||||||
$this->assertArrayHasKey($key, $conf,
|
$this->assertArrayHasKey(
|
||||||
'Key $conf[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'prosemirror/conf/default.php');
|
$key,
|
||||||
|
$conf,
|
||||||
|
'Key $conf[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'prosemirror/conf/default.php'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user