diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..cc4fd0c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +/.github/ export-ignore +/_test/ export-ignore \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 1dc684f..bf47b93 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ +# Sponsoring is available via https://github.com/sponsors/mprins github: [mprins] diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b44fd49..0a21b50 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,46 +1,46 @@ name: CI -on: [push, pull_request] +on: [ push, pull_request ] jobs: - testLinux: - name: PHP Unit - runs-on: ubuntu-latest - - strategy: - matrix: - php-version: ['8.0', '8.1', '8.2'] - dokuwiki-branch: [ 'master', 'stable'] - fail-fast: false - - steps: - - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - extensions: mbstring, intl, 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: Install DokuWiki - env: - CI_SERVER: 1 - DOKUWIKI: ${{ matrix.dokuwiki-branch }} - run: sh travis.sh - - - name: Setup PHPUnit - run: | - php _test/fetchphpunit.php - ./_test/phpunit.phar --version - - - name: Run PHPUnit - run: | - cd _test && PRESERVE_TMP=false ./phpunit.phar --stderr --verbose --debug --group plugin_geotag + testLinux: + name: PHP Unit + runs-on: ubuntu-latest + + strategy: + matrix: + php-version: [ '8.0', '8.1', '8.2' ] + dokuwiki-branch: [ 'master', 'stable' ] + fail-fast: false + + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mbstring, intl, 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: Install DokuWiki + env: + CI_SERVER: 1 + DOKUWIKI: ${{ matrix.dokuwiki-branch }} + run: sh travis.sh + + - name: Setup PHPUnit + run: | + php _test/fetchphpunit.php + ./_test/phpunit.phar --version + + - name: Run PHPUnit + run: | + cd _test && PRESERVE_TMP=false ./phpunit.phar --stderr --verbose --debug --group plugin_geotag diff --git a/.github/workflows/maintenance.yml b/.github/workflows/maintenance.yml index 1b4a2c3..c1b375f 100644 --- a/.github/workflows/maintenance.yml +++ b/.github/workflows/maintenance.yml @@ -1,6 +1,7 @@ name: 'Repository Maintenance' on: + workflow_dispatch: schedule: - cron: '41 9 * * 5' diff --git a/.github/workflows/phpCS.yml b/.github/workflows/phpCS.yml index b9dc85a..9ff2b5d 100644 --- a/.github/workflows/phpCS.yml +++ b/.github/workflows/phpCS.yml @@ -1,34 +1,34 @@ name: PHP Code Style -on: [push] +on: [ push ] jobs: - phpcs: - name: PHP CodeSniffer - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + phpcs: + name: PHP CodeSniffer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '7.4' - tools: cs2pr, phpcs + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: cs2pr, phpcs - - name: retrieve script - run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh + - name: retrieve script + run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh - - name: Install DokuWiki - env: - CI_SERVER: 1 - DOKUWIKI : master - run: sh travis.sh + - name: Install DokuWiki + env: + CI_SERVER: 1 + DOKUWIKI: master + run: sh travis.sh -# - name: run PHP codesniffer -# run: php phpcs -v --runtime-set ignore_warnings_on_exit true --standard=_test/phpcs.xml lib/plugins/geotag - - name: run PHP codesniffer - run: phpcs -v --standard=_test/phpcs_MigrationAdjustments.xml --report-full --report-checkstyle=./phpcs-report.xml lib/plugins/geotag + # - name: run PHP codesniffer + # run: php phpcs -v --runtime-set ignore_warnings_on_exit true --standard=_test/phpcs.xml lib/plugins/geotag + - name: run PHP codesniffer + run: phpcs -v --standard=_test/phpcs_MigrationAdjustments.xml --report-full --report-checkstyle=./phpcs-report.xml lib/plugins/geotag - - name: Annotate PR - if: ${{ always() && steps.phpcs.outcome == 'failure' }} - run: cs2pr --notices-as-warnings --colorize ./phpcs-report.xml \ No newline at end of file + - name: Annotate PR + if: ${{ always() && steps.phpcs.outcome == 'failure' }} + run: cs2pr --notices-as-warnings --colorize ./phpcs-report.xml \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1b4effe --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,16 @@ +name: Release + +on: + push: + branches: + - master + paths: + - "*.info.txt" + +jobs: + release: + name: Release + uses: mprins/.github/.github/workflows/DW-plugin-release.yml@main + secrets: + DOKUWIKI_USER: ${{ secrets.DOKUWIKI_USER }} + DOKUWIKI_PASS: ${{ secrets.DOKUWIKI_PASS }} \ No newline at end of file diff --git a/deleted.files b/deleted.files index ccc396d..cc3c8e3 100644 --- a/deleted.files +++ b/deleted.files @@ -1,3 +1,16 @@ helper.php script.js -CHANGES \ No newline at end of file +CHANGES + +_test/action.test.php +_test/general.test.php +_test/data/pages/fullgeotag.txt +_test/data/pages/fullgeotagnegativecoords.txt +_test/data/pages/minimalgeotag.txt +_test/data/pages/nogeotag.txt + +.github/workflows/phpCS.yml +.github/workflows/maintenance.yml +.github/workflows/CI.yml +.github/dependabot.yml +.github/ISSUE_TEMPLATE.md \ No newline at end of file diff --git a/plugin.info.txt b/plugin.info.txt index cc903c4..6af75be 100644 --- a/plugin.info.txt +++ b/plugin.info.txt @@ -1,7 +1,7 @@ base geotag author Mark C. Prins email mprins@users.sf.net -date 2022-11-21 +date 2023-06-30 name geotag plugin desc Allow a user to annotate pages with a geotag url https://www.dokuwiki.org/plugin:geotag