Give api a rudimentary session guard #82
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: UnitTests | |
on: | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
pgetinker-tests: | |
runs-on: self-hosted | |
steps: | |
- name: 'Cleanup build folder' | |
run: | | |
ls -la ./ | |
rm -rf ./* || true | |
rm -rf ./.??* || true | |
ls -la ./ | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Commit Hash | |
id: vars | |
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
- name: Add "VERSION" hashes to .env | |
run: echo -e "VERSION=${{ steps.vars.outputs.sha }}\nVITE_VERSION=${{ steps.vars.outputs.sha }}" >> .env.example | |
- name: Copy environment file and set version | |
run: cp .env.test .env | |
- name: Install Dependencies | |
run: npm install && npm run build && composer install --prefer-dist --no-interaction --no-progress && php artisan dusk:chrome-driver --detect | |
- 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 Unit Tests | |
run: php artisan test | |
- name: Run Server | |
run: php artisan serve & | |
- name: Execute Browser Tests | |
run: php artisan dusk |