From e17856a740b7ae2b6ff5765b6e431deae8ba375a Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Sat, 8 Jun 2024 17:54:33 +0000 Subject: [PATCH] Add GitHub Actions workflow for installation and t --- .github/workflows/install.yml | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/install.yml diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml new file mode 100644 index 00000000..59556f43 --- /dev/null +++ b/.github/workflows/install.yml @@ -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 \ No newline at end of file