Skip to content

Improve GitHub workflow for PHP #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 0 additions & 84 deletions .github/workflows/php.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

on: [pull_request]

jobs:
test:
name: Lint & Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup PHP and Composer
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: none

- name: Get Cache Directory
id: composer-cache-dir
run: echo dir=$(composer config cache-files-dir) >> $GITHUB_OUTPUT

- name: Cache Dependencies
uses: actions/cache@v4
with:
key: composer-cache-${{ hashFiles('**/composer.lock') }}
path: ${{ steps.composer-cache-dir.outputs.dir }}
restore-keys: composer-cache-

- name: Install Dependencies
run: composer install -q --no-interaction

- name: Configure Application
run: |
cp .env.testing .env
php artisan key:generate

- name: Run Linter
run: composer lint

- name: Run Tests
run: composer test