Repository navigation
49 lines (41 loc) · 1.81 KB
/
Copy pathdevelopment.yml
File metadata and controls
49 lines (41 loc) · 1.81 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
name: Police Scorecard - Development
on:
push:
branches:
- develop
jobs:
build_and_test:
name: Validate PHP 8.4 Migration
runs-on: [self-hosted, linux, X64]
env:
PHP84_BINARY: /opt/policescorecard/php84/bin/php
COMPOSER84_PHAR: /opt/policescorecard/php84/bin/composer.phar
steps:
- name: Check out Repository
uses: actions/checkout@v2
- name: Verify PHP 8.4 Runtime
run: |
"$PHP84_BINARY" -r 'exit(PHP_MAJOR_VERSION === 8 && PHP_MINOR_VERSION === 4 && version_compare(PHP_VERSION, "8.4.27", ">=") ? 0 : 1);'
"$PHP84_BINARY" "$COMPOSER84_PHAR" --version
echo /opt/policescorecard/php84/bin >> "$GITHUB_PATH"
- name: Prepare The Test Environment
run: |
cp .env.ci .env
mkdir -p bootstrap/cache storage/framework/cache/data storage/framework/sessions storage/framework/views storage/logs
- name: Install Composer Dependencies
run: |
"$PHP84_BINARY" "$COMPOSER84_PHAR" install --no-ansi --no-interaction --no-progress --prefer-dist
"$PHP84_BINARY" "$COMPOSER84_PHAR" check-platform-reqs
"$PHP84_BINARY" artisan key:generate
- name: Install Node Dependencies
run: npm ci --no-optional
- name: Build Development Assets
run: npm run -s dev
- name: Run Lint Tests
run: npm run -s test-lint
- name: Run Unit Tests
run: '"$PHP84_BINARY" vendor/bin/phpunit --display-all-issues'
# During migration, prepare and validate the release through SSH.
# The existing /usr/local/bin/deploy-development still uses PHP 7.3.
- name: Manual Release Preparation Required
run: echo 'Validation complete. Development deployment is handled through SSH during the in-place migration; automatic deployment is paused.'