Skip to content

Commit efc71f7

Browse files
committed
migrate GH worklflows
1 parent f4d4b7f commit efc71f7

File tree

4 files changed

+147
-58
lines changed

4 files changed

+147
-58
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,72 @@
11
name: Bug Report
22
description: |
3-
Found a bug in NativePHP? You're in the right place!
3+
Found a bug in NativePHP for Desktop? You're in the right place!
44
labels: ["bug"]
55
body:
6-
- type: markdown
7-
attributes:
8-
value: |
9-
We're sorry to hear you have a problem.
6+
- type: markdown
7+
attributes:
8+
value: |
9+
We're sorry to hear you have a problem.
1010
11-
Before submitting your report, please make sure you've been through the section "[Debugging](https://nativephp.com/docs/getting-started/debugging)" in the docs.
11+
Before submitting your report, please make sure you've been through the section "[Debugging](https://nativephp.com/docs/getting-started/debugging)" in the docs.
1212
13-
Please also ensure that you have the latest version of NativePHP packages installed, and are using [supported versions](https://nativephp.com/docs/desktop/1/getting-started/support-policy) of PHP and Laravel.
13+
Please also ensure that you have the latest version of NativePHP packages installed, and are using [supported versions](https://nativephp.com/docs/desktop/1/getting-started/support-policy) of PHP and Laravel.
1414
15-
If nothing here has helped you, please provide as much useful context as you can here to help us solve help you.
15+
If nothing here has helped you, please provide as much useful context as you can here to help us solve help you.
1616
17-
Note that reams and reams of logs isn't helpful - please share only relevant errors.
17+
Note that reams and reams of logs isn't helpful - please share only relevant errors.
1818
19-
If possible, please prepare a reproduction repo and link to it in the Notes field.
20-
- type: textarea
21-
id: what-doing
22-
attributes:
23-
label: What were you trying to do?
24-
description: Some context about what you were trying to achieve
25-
placeholder: Trying to build my app for production
26-
validations:
27-
required: true
19+
If possible, please prepare a reproduction repo and link to it in the Notes field.
20+
- type: textarea
21+
id: what-doing
22+
attributes:
23+
label: What were you trying to do?
24+
description: Some context about what you were trying to achieve
25+
placeholder: Trying to build my app for production
26+
validations:
27+
required: true
2828

29-
- type: textarea
30-
id: what-happened
31-
attributes:
32-
label: What happened?
33-
description: What did you expect to happen?
34-
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
35-
validations:
36-
required: true
29+
- type: textarea
30+
id: what-happened
31+
attributes:
32+
label: What happened?
33+
description: What did you expect to happen?
34+
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
35+
validations:
36+
required: true
3737

38-
- type: textarea
39-
id: how-to-reproduce
40-
attributes:
41-
label: How to reproduce the bug
42-
description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
43-
placeholder: When I do X I see Y.
44-
validations:
45-
required: true
38+
- type: textarea
39+
id: how-to-reproduce
40+
attributes:
41+
label: How to reproduce the bug
42+
description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
43+
placeholder: When I do X I see Y.
44+
validations:
45+
required: true
4646

47-
- type: textarea
48-
id: debug
49-
attributes:
50-
label: Debug Output
51-
description: Please provide output from the NativePHP Debug command. This will help us understand your environment and the issue you're facing. (`php artisan native:debug`)
52-
validations:
53-
required: true
47+
- type: textarea
48+
id: debug
49+
attributes:
50+
label: Debug Output
51+
description: Please provide output from the NativePHP Debug command. This will help us understand your environment and the issue you're facing. (`php artisan native:debug`)
52+
validations:
53+
required: true
5454

55-
- type: dropdown
56-
id: operating-systems
57-
attributes:
58-
label: Which operating systems have you seen this occur on?
59-
description: You may select more than one.
60-
multiple: true
61-
options:
55+
- type: dropdown
56+
id: operating-systems
57+
attributes:
58+
label: Which operating systems have you seen this occur on?
59+
description: You may select more than one.
60+
multiple: true
61+
options:
6262
- macOS
6363
- Windows
6464
- Linux
6565

66-
- type: textarea
67-
id: notes
68-
attributes:
69-
label: Notes
70-
description: Use this field to provide any other notes that you feel might be relevant to the issue. Include links to any reproduction repos you've created here.
71-
validations:
72-
required: false
66+
- type: textarea
67+
id: notes
68+
attributes:
69+
label: Notes
70+
description: Use this field to provide any other notes that you feel might be relevant to the issue. Include links to any reproduction repos you've created here.
71+
validations:
72+
required: false

.github/workflows/build-plugin.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# If it's a pull request, don't build the plugin, just fail if it can't be built
2+
# If it's a push to main, build the plugin
3+
4+
name: plugin-build
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
workflow_dispatch:
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- uses: actions/checkout@v5
22+
with:
23+
ref: ${{ github.event.pull_request.head.ref }}
24+
repository: ${{ github.event.pull_request.head.repo.full_name }}
25+
26+
- name: Use Node.js
27+
uses: actions/setup-node@v5
28+
with:
29+
node-version: 22.x
30+
31+
- name: Install dependencies
32+
working-directory: ./resources/js/
33+
run: npm install
34+
35+
- name: Build plugin
36+
working-directory: ./resources/js/
37+
run: npm run plugin:build
38+
39+
- name: Commit changes
40+
if: github.event_name == 'pull_request'
41+
uses: stefanzweifel/git-auto-commit-action@v6
42+
with:
43+
commit_message: Build plugin
44+
45+
- name: Create Pull Request
46+
if: github.event_name != 'pull_request'
47+
uses: peter-evans/create-pull-request@v7
48+
with:
49+
commit-message: Build plugin
50+
title: 'Auto: Build plugin assets'
51+
body: |
52+
This PR contains the latest built plugin assets.
53+
54+
**Build Details:**
55+
- Triggered by: ${{ github.actor }}
56+
- From commit: [${{ github.sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }})
57+
- Workflow run: [View Run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
58+
59+
Automatically generated by the plugin-build workflow.
60+
branch: build-plugin-update
61+
base: main
62+
delete-branch: true
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: plugin-tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
15+
- name: Use Node.js
16+
uses: actions/setup-node@v5
17+
with:
18+
node-version: 22.x
19+
20+
- name: Install dependencies
21+
working-directory: ./resources/js/
22+
run: npm install
23+
24+
- name: Run tests
25+
working-directory: ./resources/js/
26+
run: npm run plugin:test

.github/workflows/run-tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: run-tests
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches: [main]
67
pull_request:
@@ -12,7 +13,7 @@ jobs:
1213
strategy:
1314
fail-fast: false
1415
matrix:
15-
os: [ubuntu-latest, windows-latest]
16+
os: [ubuntu-latest, windows-latest, macos-latest]
1617
php: [8.4, 8.3]
1718
laravel: [12.*, 11.*]
1819
stability: [prefer-lowest, prefer-stable]
@@ -43,8 +44,8 @@ jobs:
4344
- name: List Installed Dependencies
4445
run: composer show
4546

46-
# - name: Debug PhpUnit version
47-
# run: composer why phpunit/phpunit -t
47+
- name: Show pest version
48+
run: vendor/bin/pest --version
4849

4950
- name: Execute tests
5051
run: vendor/bin/pest

0 commit comments

Comments
 (0)