mirror of
https://gh.wpcy.net/https://github.com/fairpm/aspirecloud.git
synced 2026-06-20 02:22:28 +08:00
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.14.2 to 2.16.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](5ef0c079ce...fa2e9d605c)
---
updated-dependencies:
- dependency-name: step-security/harden-runner
dependency-version: 2.16.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
84 lines
2.4 KiB
YAML
84 lines
2.4 KiB
YAML
name: PHP Test Suite
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
permissions: # added using https://github.com/step-security/secure-repo
|
|
contents: read
|
|
|
|
jobs:
|
|
php-test:
|
|
runs-on: ubuntu-24.04
|
|
|
|
strategy:
|
|
matrix:
|
|
php-versions: [ '8.4' ]
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:latest
|
|
env:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: aspirecloud_testing
|
|
ports:
|
|
- 5432/tcp
|
|
options: --health-cmd pg_isready --health-interval 2s --health-timeout 2s --health-retries 10
|
|
|
|
steps:
|
|
- name: Harden the runner (Audit all outbound calls)
|
|
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@7bf05c6b704e0b9bfee22300130a31b5ea68d593 # v2
|
|
with:
|
|
php-version: ${{ matrix.php-versions }}
|
|
extensions: mbstring, pgsql
|
|
# not doing coverage in CI yet
|
|
# coverage: xdebug
|
|
|
|
- name: Get composer cache directory
|
|
id: composer-cache
|
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache composer dependencies
|
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: ${{ runner.os }}-composer-
|
|
|
|
- name: Install dependencies
|
|
run: composer install
|
|
|
|
- name: Prepare tests
|
|
run: |
|
|
cp .env.example .env
|
|
php artisan key:generate
|
|
php artisan migrate
|
|
env:
|
|
CACHE_STORE: array
|
|
DB_HOST: localhost
|
|
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
|
DB_USERNAME: postgres
|
|
DB_PASSWORD: postgres
|
|
DB_DATABASE: aspirecloud_testing
|
|
|
|
- name: Run Pest
|
|
run: vendor/bin/pest --ci
|
|
env:
|
|
CACHE_STORE: array
|
|
DB_HOST: localhost
|
|
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
|
DB_USERNAME: postgres
|
|
DB_PASSWORD: postgres
|
|
DB_DATABASE: aspirecloud_testing
|
|
|