-
-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (56 loc) · 1.84 KB
/
test.yml
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
name: test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- name: install node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: install dependencies
run: pnpm install --frozen-lockfile
- run: cp .env.example .env
working-directory: examples/laravel10-app
- name: Setup Docker on macOS
uses: douglascamata/setup-docker-macos-action@v1-alpha
if: startsWith(matrix.os, 'macos')
- name: composer install
run: docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/var/www/html" -w /var/www/html laravelsail/php81-composer:latest composer install --ignore-platform-reqs
working-directory: examples/laravel10-app
- name: start database
run: ./vendor/bin/sail up -d mysql
working-directory: examples/laravel10-app
- name: start laravel
run: ./vendor/bin/sail up -d
working-directory: examples/laravel10-app
- name: generate key
run: ./vendor/bin/sail artisan key:generate
working-directory: examples/laravel10-app
- name: migrate
run: ./vendor/bin/sail artisan migrate
working-directory: examples/laravel10-app
- name: npm install
run: ./vendor/bin/sail npm install
working-directory: examples/laravel10-app
- name: generate types
run: sh debug.sh
- name: archive generated files
uses: actions/upload-artifact@v4
with:
name: generated-file-${{ matrix.os }}
path: examples/laravel10-app/resources/js/types