Skip to content

Commit 86dcd47

Browse files
committed
Add frontend action template to Skeleton
1 parent 0d48ed2 commit 86dcd47

File tree

6 files changed

+202
-96
lines changed

6 files changed

+202
-96
lines changed

.github/workflows/Frontend.yml

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,100 @@
11
name: Frontend
22

33
on:
4-
push:
5-
branches: [6.0]
6-
paths:
7-
- packages/skeleton/**
8-
- packages/sprinkle-account/**
9-
- packages/sprinkle-admin/**
10-
- packages/sprinkle-core/**
11-
- packages/theme-pink-cupcake/**
12-
pull_request:
13-
branches: [6.0]
14-
workflow_dispatch:
4+
push:
5+
branches: [6.0]
6+
paths:
7+
- packages/skeleton/**
8+
- packages/sprinkle-account/**
9+
- packages/sprinkle-admin/**
10+
- packages/sprinkle-core/**
11+
- packages/theme-pink-cupcake/**
12+
pull_request:
13+
branches: [6.0]
14+
workflow_dispatch:
1515

1616
jobs:
17-
Build:
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
node_versions: [18, 22, 24]
22-
23-
runs-on: ubuntu-latest
24-
name: Build - Node ${{ matrix.node_versions }}
25-
26-
steps:
27-
- uses: actions/checkout@v4
28-
29-
- uses: actions/setup-node@v4
30-
with:
31-
node-version: ${{ matrix.node_versions }}
32-
33-
- name: Install Dependencies
34-
run: npm ci
35-
36-
- name: Build Packages
37-
run: npm run build
38-
39-
- name: Build Skeleton
40-
run: npm run --workspace=userfrosting vite:build
41-
42-
Coverage:
43-
strategy:
44-
fail-fast: false
45-
matrix:
46-
node_versions: [18, 22, 24]
47-
48-
runs-on: ubuntu-latest
49-
name: Test & Coverage - Node ${{ matrix.node_versions }}
50-
51-
steps:
52-
- uses: actions/checkout@v4
53-
54-
- uses: actions/setup-node@v4
55-
with:
56-
node-version: ${{ matrix.node_versions }}
57-
58-
- name: Install Dependencies
59-
run: npm ci
60-
61-
- name: Test & Coverage
62-
run: npm run coverage
63-
64-
- name: Upload coverage to Codecov
65-
if: github.event_name != 'schedule'
66-
uses: codecov/codecov-action@v5
67-
with:
68-
token: ${{ secrets.CODECOV_TOKEN }}
69-
files: ./_meta/_coverage/clover.xml
70-
fail_ci_if_error: true
71-
72-
- name: Upload test results to Codecov
73-
if: ${{ !cancelled() }}
74-
uses: codecov/test-results-action@v1
75-
with:
76-
files: ./_meta/junit_frontend.xml
77-
token: ${{ secrets.CODECOV_TOKEN }}
78-
79-
Prettier:
80-
runs-on: ubuntu-latest
81-
name: Code Style Check
82-
83-
steps:
84-
- uses: actions/checkout@v4
85-
86-
- uses: actions/setup-node@v4
87-
with:
88-
node-version: 24
89-
90-
- name: Install Dependencies
91-
run: npm ci
92-
93-
- name: Prettier dry run
94-
run: npm run format-dry-run
95-
96-
- name: TypeCheck
97-
run: npm run typecheck
98-
99-
- name: Eslint
100-
run: npm run lint
17+
Build:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
node_versions: [18, 22, 24]
22+
23+
runs-on: ubuntu-latest
24+
name: Build - Node ${{ matrix.node_versions }}
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node_versions }}
32+
33+
- name: Install Dependencies
34+
run: npm ci
35+
36+
- name: Build Packages
37+
run: npm run build
38+
39+
- name: Build Skeleton
40+
run: npm run --workspace=userfrosting vite:build
41+
42+
Coverage:
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
node_versions: [18, 22, 24]
47+
48+
runs-on: ubuntu-latest
49+
name: Test & Coverage - Node ${{ matrix.node_versions }}
50+
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- uses: actions/setup-node@v4
55+
with:
56+
node-version: ${{ matrix.node_versions }}
57+
58+
- name: Install Dependencies
59+
run: npm ci
60+
61+
- name: Test & Coverage
62+
run: npm run coverage
63+
64+
- name: Upload coverage to Codecov
65+
if: github.event_name != 'schedule'
66+
uses: codecov/codecov-action@v5
67+
with:
68+
token: ${{ secrets.CODECOV_TOKEN }}
69+
files: ./_meta/_coverage/clover.xml
70+
fail_ci_if_error: true
71+
72+
- name: Upload test results to Codecov
73+
if: ${{ !cancelled() }}
74+
uses: codecov/test-results-action@v1
75+
with:
76+
files: ./_meta/junit_frontend.xml
77+
token: ${{ secrets.CODECOV_TOKEN }}
78+
79+
Prettier:
80+
runs-on: ubuntu-latest
81+
name: Code Style Check
82+
83+
steps:
84+
- uses: actions/checkout@v4
85+
86+
- uses: actions/setup-node@v4
87+
with:
88+
node-version: 24
89+
90+
- name: Install Dependencies
91+
run: npm ci
92+
93+
- name: Prettier dry run
94+
run: npm run format-dry-run
95+
96+
- name: TypeCheck
97+
run: npm run typecheck
98+
99+
- name: Eslint
100+
run: npm run lint

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99
- [Skeleton] Remove `composer.lock` from `.gitignore`
1010
- [Skeleton] Load `.env` file in Vite config
1111
- [Skeleton] Add Vitest config
12+
- [Skeleton] Add frontend action template to Skeleton
1213
- [Core] Remove `site.debug.ajax` config (legacy jQuery flag)
1314
- [Core] Change `PHP_RECOMMENDED_VERSION` to PHP 8.5
1415
- [Framework] Replace `jackiedo/dotenv-editor` with our own implementation to avoid dependency on an unmaintained package.
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# GitHub Actions Workflow template for PHPStan Testing.
2+
# Uncomment the "on" section below to enable PHPStan testing on GitHub Actions on push.
3+
4+
name: Frontend
5+
6+
on:
7+
# push:
8+
# branches: ['*'] # Apply to all branches. List specific branches if needed.
9+
# pull_request:
10+
# branches: ['*'] # Apply to all branches. List specific branches if needed.
11+
workflow_dispatch:
12+
13+
# Each jobs section defines a different action:
14+
# - Build: Builds the frontend packages to make sure there are no build errors.
15+
# - Coverage: Runs tests and collects coverage information.
16+
# - Prettier: Checks code style and runs type checks and linting.
17+
jobs:
18+
Build:
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
node_versions: [18, 22, 24]
23+
24+
runs-on: ubuntu-latest
25+
name: Build - Node ${{ matrix.node_versions }}
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node_versions }}
33+
34+
- name: Install Dependencies
35+
run: npm ci
36+
37+
- name: Build Packages
38+
run: npm run vite:build
39+
40+
Coverage:
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
node_versions: [18, 22, 24]
45+
46+
runs-on: ubuntu-latest
47+
name: Test & Coverage - Node ${{ matrix.node_versions }}
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- uses: actions/setup-node@v4
53+
with:
54+
node-version: ${{ matrix.node_versions }}
55+
56+
- name: Install Dependencies
57+
run: npm ci
58+
59+
- name: Test & Coverage
60+
run: npm run coverage
61+
62+
- name: Upload coverage to Codecov
63+
if: github.event_name != 'schedule'
64+
uses: codecov/codecov-action@v5
65+
with:
66+
token: ${{ secrets.CODECOV_TOKEN }}
67+
files: ./_meta/_coverage/clover.xml
68+
fail_ci_if_error: true
69+
70+
- name: Upload test results to Codecov
71+
if: ${{ !cancelled() }}
72+
uses: codecov/test-results-action@v1
73+
with:
74+
files: ./_meta/junit_frontend.xml
75+
token: ${{ secrets.CODECOV_TOKEN }}
76+
77+
Prettier:
78+
runs-on: ubuntu-latest
79+
name: Code Style Check
80+
81+
steps:
82+
- uses: actions/checkout@v4
83+
84+
- uses: actions/setup-node@v4
85+
with:
86+
node-version: 24
87+
88+
- name: Install Dependencies
89+
run: npm ci
90+
91+
- name: Prettier dry run
92+
run: npm run format-dry-run
93+
94+
- name: TypeCheck
95+
run: npm run typecheck
96+
97+
- name: Eslint
98+
run: npm run lint

packages/skeleton/.github/workflows/PHPUnit.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
php_versions: ['8.1', '8.2', '8.3', '8.4', '8.5']
6262
runs-on: ubuntu-latest
6363
name: PHPUnit - PHP ${{ matrix.php_versions }} - MySQL
64+
needs: Memory
6465

6566
env:
6667
DB_TEST_CONNECTION: mysql
@@ -125,6 +126,7 @@ jobs:
125126
php_versions: ['8.1', '8.2', '8.3', '8.4', '8.5']
126127
runs-on: ubuntu-latest
127128
name: PHPUnit - PHP ${{ matrix.php_versions }} - MariaDB
129+
needs: Memory
128130

129131
env:
130132
DB_TEST_CONNECTION: mysql
@@ -182,6 +184,7 @@ jobs:
182184
php_versions: ['8.1', '8.2', '8.3', '8.4', '8.5']
183185
runs-on: ubuntu-latest
184186
name: PHPUnit - PHP ${{ matrix.php_versions }} - SQLite
187+
needs: Memory
185188

186189
env:
187190
DB_TEST_CONNECTION: sqlite
@@ -229,6 +232,7 @@ jobs:
229232
php_versions: ['8.1', '8.2', '8.3', '8.4', '8.5']
230233
runs-on: ubuntu-latest
231234
name: PHPUnit - PHP ${{ matrix.php_versions }} - PostgreSQL
235+
needs: Memory
232236

233237
env:
234238
DB_TEST_CONNECTION: pgsql
@@ -282,6 +286,7 @@ jobs:
282286
php_versions: ['8.1', '8.2', '8.3', '8.4', '8.5']
283287
runs-on: windows-latest
284288
name: PHPUnit - PHP ${{ matrix.php_versions }} - Windows
289+
needs: Memory
285290

286291
env:
287292
DB_TEST_CONNECTION: sqlite

packages/skeleton/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212
- Remove `composer.lock` from `.gitignore`
1313
- Load `.env` file in Vite config
1414
- Add Vitest config
15+
- Add frontend action template to Skeleton
1516

1617
## [6.0.0-beta.8](https://github.com/userfrosting/UserFrosting/compare/6.0.0-beta.7...6.0.0-beta.8)
1718
- Updated `vite.config.ts` : Other packages removed from `optimizeDeps`

packages/skeleton/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"coverage": "vitest run --coverage",
6262
"typecheck": "vue-tsc --noEmit",
6363
"lint": "eslint app/assets/ --fix",
64-
"format": "prettier --write app/assets/"
64+
"format": "prettier --write app/assets/",
65+
"format-dry-run": "prettier --check app/assets/"
6566
}
6667
}

0 commit comments

Comments
 (0)