-
-
Notifications
You must be signed in to change notification settings - Fork 245
115 lines (94 loc) · 3.67 KB
/
Copy pathtests.yml
File metadata and controls
115 lines (94 loc) · 3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Tests
on:
push:
branches:
- '1.2'
- develop
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
frontendTests:
strategy:
max-parallel: 2
matrix:
operatingSystem: [ubuntu-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.operatingSystem }}
name: ${{ matrix.operatingSystem }} / JavaScript
env:
GITHUB_TOKEN: ${{ secrets.COMPOSER_GITHUB_TOKEN }}
steps:
- name: Checkout changes
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Switch library dependency (develop)
if: github.ref == 'refs/heads/develop' || github.base_ref == 'develop'
run: php ./.github/workflows/utilities/library-switcher "dev-wip/1.3 as 1.3"
- name: Switch library dependency (1.2)
if: github.head_ref == '1.2' || github.ref == 'refs/heads/1.2' || github.base_ref == '1.2'
run: php ./.github/workflows/utilities/library-switcher "1.2.x-dev as 1.2"
- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts
- name: Reset modules
run: |
git reset --hard
git clean -fd
- name: Run post-update Composer scripts
run: php artisan package:discover
- name: Run tests
run: |
php artisan mix:install
php artisan mix:run module-system test
phpUnitTests:
strategy:
max-parallel: 8
matrix:
operatingSystem: [ubuntu-latest, windows-latest]
phpVersion: ['8.3', '8.4', '8.5']
fail-fast: false
runs-on: ${{ matrix.operatingSystem }}
name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }}
env:
GITHUB_TOKEN: ${{ secrets.COMPOSER_GITHUB_TOKEN }}
steps:
- name: Checkout changes
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.phpVersion }}
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
- name: Switch library dependency (develop)
if: github.ref == 'refs/heads/develop' || github.base_ref == 'develop'
run: php ./.github/workflows/utilities/library-switcher "dev-wip/1.3 as 1.3"
- name: Switch library dependency (1.0)
if: github.head_ref == '1.0' || github.ref == 'refs/heads/1.0' || github.base_ref == '1.0'
run: php ./.github/workflows/utilities/library-switcher "1.0.x-dev as 1.0"
- name: Switch library dependency (1.1)
if: github.head_ref == '1.1' || github.ref == 'refs/heads/1.1' || github.base_ref == '1.1'
run: php ./.github/workflows/utilities/library-switcher "1.1.x-dev as 1.1"
- name: Switch library dependency (1.2)
if: github.head_ref == '1.2' || github.ref == 'refs/heads/1.2' || github.base_ref == '1.2'
run: php ./.github/workflows/utilities/library-switcher "1.2.x-dev as 1.2"
- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts
- name: Reset modules
run: |
git reset --hard
git clean -fd
- name: Run post-update Composer scripts
run: php artisan package:discover
- name: Run Linting and Tests
run: |
composer lint
php artisan winter:test -m system -m backend -m cms