Skip to content

Commit 83fc8bd

Browse files
Copilotdd32
andcommitted
Add GitHub Actions CI, restore composer.json, gitignore lock files, fix ANSI escapes
Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
1 parent 514b2df commit 83fc8bd

6 files changed

Lines changed: 57 additions & 5667 deletions

File tree

.github/workflows/test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
name: Integration tests (wp-env)
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 'lts/*'
22+
cache: 'npm'
23+
24+
- name: Install Node.js dependencies
25+
run: npm ci
26+
27+
# Cache the wp-env working directory (~/.wp-env) so that the WordPress
28+
# download and database setup are reused across runs when nothing changes.
29+
- name: Cache wp-env
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.wp-env
33+
key: wp-env-${{ hashFiles('package-lock.json', '.wp-env.json') }}
34+
restore-keys: |
35+
wp-env-
36+
37+
- name: Start wp-env
38+
run: npx wp-env start
39+
40+
- name: Run tests
41+
run: npm test
42+
43+
- name: Stop wp-env
44+
run: npx wp-env stop
45+
if: always()

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
vendor/
21
node_modules/
2+
vendor/
33
.wp-env/
4+
composer.lock
5+
package-lock.json

0 commit comments

Comments
 (0)