Skip to content

Commit 21271ba

Browse files
authored
Use new action for tests
1 parent 843b121 commit 21271ba

File tree

1 file changed

+5
-59
lines changed

1 file changed

+5
-59
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -11,71 +11,17 @@ jobs:
1111
runs-on: ubuntu-latest
1212
name: Unit Tests / PHP ${{ matrix.phpVersion }} / Winter ${{ matrix.winterRelease }}
1313
strategy:
14-
max-parallel: 6
14+
max-parallel: 3
1515
matrix:
1616
phpVersion: ['8.0', '8.1', '8.2']
17-
winterRelease: ['develop']
18-
winterReleaseDir: ['develop']
1917
fail-fast: false
20-
env:
21-
phpExtensions: mbstring, intl, gd, xml, sqlite
22-
cacheKey: ext-cache-v1
23-
winterCmsRelease: develop
2418
steps:
25-
- name: Checkout changes
26-
uses: actions/checkout@v2
27-
with:
28-
path: redirect-plugin
29-
30-
- name: Setup cache environment
31-
id: extcache
32-
uses: shivammathur/cache-extensions@v1
33-
with:
34-
php-version: ${{ matrix.phpVersion }}
35-
extensions: ${{ env.phpExtensions }}
36-
key: ${{ env.cacheKey }}
37-
38-
- name: Cache extensions
39-
uses: actions/cache@v2
40-
with:
41-
path: ${{ steps.extcache.outputs.dir }}
42-
key: ${{ steps.extcache.outputs.key }}
43-
restore-keys: ${{ steps.extcache.outputs.key }}
44-
45-
- name: Install PHP and extensions
46-
uses: shivammathur/setup-php@v2
19+
- name: Setup Winter
20+
uses: wintercms/setup-winter-action@v1
4721
with:
4822
php-version: ${{ matrix.phpVersion }}
49-
extensions: ${{ env.phpExtensions }}
50-
tools: composer:v2
51-
coverage: none
52-
53-
- name: Install Winter CMS
54-
run: |
55-
wget https://github.com/wintercms/winter/archive/${{ matrix.winterRelease }}.zip
56-
unzip ${{ matrix.winterRelease }}.zip
57-
rm ${{ matrix.winterRelease }}.zip
58-
shopt -s dotglob
59-
mv winter-${{ matrix.winterReleaseDir }}/* ./
60-
rmdir winter-${{ matrix.winterReleaseDir }}
61-
shopt -u dotglob
62-
[ ! -f config/testing/cms.php ] && cp config/cms.php config/testing/cms.php
63-
mkdir -p plugins/winter
64-
mv redirect-plugin plugins/winter/redirect
65-
66-
- name: Get Composer cache directory
67-
id: composercache
68-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
69-
70-
- name: Cache dependencies
71-
uses: actions/cache@v2
72-
with:
73-
path: ${{ steps.composercache.outputs.dir }}
74-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
75-
restore-keys: ${{ runner.os }}-composer-
76-
77-
- name: Install Composer dependencies
78-
run: composer install --no-interaction --no-progress
23+
plugin-author: winter
24+
plugin-name: redirect
7925

8026
- name: Run linting
8127
run: ./vendor/bin/parallel-lint plugins/winter/redirect

0 commit comments

Comments
 (0)