Skip to content

Commit 054f7b7

Browse files
authored
Preparing for v1.0.0 release (#21)
1 parent dabad05 commit 054f7b7

36 files changed

+345
-1882
lines changed

.github/workflows/tests.yaml

Lines changed: 12 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -13,77 +13,37 @@ jobs:
1313
strategy:
1414
max-parallel: 4
1515
matrix:
16-
operatingSystem: [ubuntu-latest, windows-latest]
17-
phpVersion: ['8.0', '8.1']
16+
operatingSystem: [ubuntu-latest]
17+
phpVersion: ['8.1', '8.2', '8.3']
1818
fail-fast: false
1919
env:
2020
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
21-
key: winter-docs-cache-v1
21+
concurrency:
22+
group: ${{ github.ref }}-${{ github.workflow }}-${{ matrix.operatingSystem }}-${{ matrix.phpVersion }}
23+
cancel-in-progress: true
2224
steps:
23-
- name: Cancel previous incomplete runs
24-
uses: styfle/cancel-workflow-action@0.8.0
25-
with:
26-
access_token: ${{ github.token }}
27-
2825
- name: Checkout Winter CMS
29-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
3027
with:
3128
repository: wintercms/winter
3229
ref: develop
3330

34-
- name: Checkout plugin
35-
uses: actions/checkout@v2
31+
- name: Checkout Winter Docs plugin
32+
uses: actions/checkout@v4
3633
with:
3734
path: plugins/winter/docs
3835

39-
- name: Setup extension cache
40-
id: extcache
41-
uses: shivammathur/cache-extensions@v1
42-
with:
43-
php-version: ${{ matrix.phpVersion }}
44-
extensions: ${{ env.extensions }}
45-
key: ${{ env.key }}
46-
47-
- name: Cache extensions
48-
uses: actions/cache@v2
49-
with:
50-
path: ${{ steps.extcache.outputs.dir }}
51-
key: ${{ steps.extcache.outputs.key }}
52-
restore-keys: ${{ steps.extcache.outputs.key }}
53-
5436
- name: Install PHP
5537
uses: shivammathur/setup-php@v2
5638
with:
5739
php-version: ${{ matrix.phpVersion }}
5840
tools: composer:v2
5941
extensions: ${{ env.extensions }}
6042

61-
- name: Setup dependency cache
62-
id: composercache
63-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
64-
65-
- name: Cache dependencies
66-
uses: actions/cache@v2
67-
with:
68-
path: ${{ steps.composercache.outputs.dir }}
69-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
70-
restore-keys: ${{ runner.os }}-composer-
71-
7243
- name: Install Composer dependencies
73-
run: composer install --no-interaction --no-progress --no-scripts
74-
75-
- name: Setup problem matchers for PHPUnit
76-
if: matrix.phpVersion == '8.0'
77-
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
44+
run: |
45+
sed -i 's|plugins/myauthor/\*/composer.json|plugins/*/*/composer.json|g' composer.json
46+
composer install --no-interaction --no-progress --no-scripts
7847
7948
- name: Run tests
80-
if: matrix.phpVersion != '8.0' || matrix.operatingSystem != 'ubuntu-latest'
81-
run: php artisan winter:test -p Winter.Docs -- --testdox
82-
83-
- name: Run tests (and generate coverage report)
84-
if: matrix.phpVersion == '8.0' && matrix.operatingSystem == 'ubuntu-latest'
85-
env:
86-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
87-
run: |
88-
php artisan winter:test -p Winter.Docs --testdox --coverage-clover coverage.xml
89-
bash <(curl -s https://codecov.io/bash)
49+
run: php artisan winter:test -p Winter.Docs

Plugin.php

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22

33
namespace Winter\Docs;
44

5-
use Backend;
65
use Cms\Classes\Page;
76
use Cms\Classes\Theme;
8-
use Event;
97
use System\Classes\PluginBase;
108
use Winter\Docs\Classes\DocsManager;
119
use Winter\Docs\Classes\MarkdownDocumentation;
1210
use Winter\Docs\Classes\MarkdownPageIndex;
1311
use Winter\Docs\Classes\PHPApiPageIndex;
1412
use Winter\Storm\Support\Str;
13+
use Winter\Storm\Support\Facades\Event;
1514

1615
/**
1716
* Docs plugin.
@@ -39,20 +38,6 @@ public function pluginDetails(): array
3938
];
4039
}
4140

42-
/**
43-
* {@inheritDoc}
44-
*/
45-
public function registerQuickActions(): array
46-
{
47-
return [
48-
'help' => [
49-
'label' => 'winter.docs::lang.links.docsLink',
50-
'icon' => 'icon-question-circle',
51-
'url' => Backend::url('docs'),
52-
],
53-
];
54-
}
55-
5641
/**
5742
* {@inheritDoc}
5843
*/
@@ -156,6 +141,8 @@ public function registerSearchHandlers(): array
156141
}
157142

158143
return [
144+
'group' => ($record->group_1 ?? null),
145+
'label' => (!empty($record->group_3)) ? ($record->group_2 ?? null) : null,
159146
'title' => $record->title,
160147
'description' => $excerpt,
161148
'url' => Page::url($page->getBaseFileName(), ['slug' => $record->path]),

assets/js/docsContent.js

Lines changed: 0 additions & 189 deletions
This file was deleted.

0 commit comments

Comments
 (0)