Repository navigation
97 lines (78 loc) · 3.12 KB
/
Copy pathskeletons.yml
File metadata and controls
97 lines (78 loc) · 3.12 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
name: skeleton installation
on:
push:
branches: ['0.4']
pull_request:
branches: ['0.4']
schedule:
- cron: '47 0 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
install:
name: Hypervel skeleton (${{ github.event_name == 'schedule' && 'published' || 'checkout' }})
if: github.event_name != 'schedule' || github.repository == 'hypervel/components'
runs-on: ubuntu-latest
timeout-minutes: 20
container:
image: ghcr.io/hypervel/components-ci:php8.4-swoole-nightly
env:
HYPERVEL_APP_DIR: ${{ github.workspace }}/.tmp/skeleton-app
COMPOSER_MEMORY_LIMIT: '-1'
steps:
- name: Checkout
uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Log trigger context
uses: ./.github/actions/log-trigger-context
- name: Validate skeleton metadata
run: composer validate --strict --no-check-lock skeletons/hypervel/composer.json
- name: Copy the checked-out skeleton and configure local packages
if: github.event_name != 'schedule'
run: |
mkdir -p "$HYPERVEL_APP_DIR"
cp -a skeletons/hypervel/. "$HYPERVEL_APP_DIR/"
php .github/scripts/use-local-packages.php "$HYPERVEL_APP_DIR" 0.4.x-dev
# Published installs catch split or Packagist problems without blocking PRs
# on changes that have not been merged and published yet.
- name: Download the published skeleton
if: github.event_name == 'schedule'
run: composer create-project hypervel/hypervel "$HYPERVEL_APP_DIR" 0.4.x-dev --no-install --no-scripts --no-interaction
- name: Initialize the environment
working-directory: ${{ env.HYPERVEL_APP_DIR }}
run: composer run-script post-root-package-install --no-interaction
- name: Install dependencies
working-directory: ${{ env.HYPERVEL_APP_DIR }}
run: composer install --prefer-dist --no-interaction --no-progress
- name: Initialize the application
working-directory: ${{ env.HYPERVEL_APP_DIR }}
run: |
composer run-script post-create-project-cmd --no-interaction
php artisan migrate --force --no-interaction
- name: Setup Node.js
uses: actions/setup-node@v7.1.0
with:
node-version: 24
- name: Build frontend assets
working-directory: ${{ env.HYPERVEL_APP_DIR }}
run: |
npm install --no-package-lock --no-audit --no-fund
npm run build
- name: Check code style
working-directory: ${{ env.HYPERVEL_APP_DIR }}
run: PHP_CS_FIXER_IGNORE_ENV=1 composer lint
- name: Analyse application code
working-directory: ${{ env.HYPERVEL_APP_DIR }}
run: composer analyse
- name: Run application tests
working-directory: ${{ env.HYPERVEL_APP_DIR }}
run: vendor/bin/phpunit
- name: Check HTTP startup
working-directory: ${{ env.HYPERVEL_APP_DIR }}
env:
SERVER_HOST: 127.0.0.1
SERVER_PORT: 18080
SERVER_WORKERS: 2
run: bash "$GITHUB_WORKSPACE/.github/scripts/check-skeleton-startup.sh"