Skip to content

Commit

Permalink
flesh out workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Moros1138 committed Apr 24, 2024
1 parent 4007963 commit 8903f87
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: BuildAndPushDocker
name: BuildAndPushDockerhub
on:
workflow_run:
workflows: [UnitTests]
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/test-on-pull-request-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: UnitTestsOnPullRequest

on:
pull_request:
branches: [ "main" ]

jobs:
pgetinker-tests:

runs-on: self-hosted

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Install and Build NodeJS dependencies
run: npm install && npm run build

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none

- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress

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

- name: Build Library Objects
run: bash build-libs.sh

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

- name: Create Database File
run: touch database/database.sqlite

- name: Initial Database Migration
run: php artisan migrate

- name: Execute tests
run: php artisan test

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: UnitTests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
pgetinker-tests:
Expand Down

0 comments on commit 8903f87

Please sign in to comment.