Skip to content
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

Sweep: Update install.yml GitHub workflow for testing the project #762

Merged
Merged
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
49 changes: 49 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Install

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Copy environment file
run: cp .env.testing .env

- name: Install dependencies
run: composer install

- name: Generate application key
run: php artisan key:generate

- name: Run database migrations
run: php artisan migrate

- name: Seed database
run: php artisan db:seed

- name: Install npm dependencies
run: npm install

- name: Build frontend assets
run: npm run build

- name: Run tests
run: php artisan test
Loading