Add GNU GPL v3 license (#64) #187
This file contains hidden or 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: Feature Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| laravel-feature-tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: password | |
| MYSQL_DATABASE: testing | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping -h 127.0.0.1" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| env: | |
| APP_NAME: "Computer Science Resources" | |
| APP_ENV: testing | |
| APP_KEY: base64:7aYe15aBsSh6a2ScVwj1JfYjQKUmz9Z5X/GSe64joHA= | |
| APP_DEBUG: 'true' | |
| APP_TIMEZONE: UTC | |
| APP_URL: http://localhost | |
| DB_CONNECTION: mysql | |
| DB_HOST: 127.0.0.1 | |
| DB_PORT: 3306 | |
| DB_DATABASE: testing | |
| DB_USERNAME: root | |
| DB_PASSWORD: password | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP & Composer | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.4 | |
| extensions: mbstring, pdo, mysql, bcmath, tokenizer | |
| tools: composer | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Install Composer dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Generate app key | |
| run: php artisan key:generate --ansi | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| - name: Cache node modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Install NPM dependencies | |
| run: npm ci | |
| - name: Build assets | |
| run: npm run build | |
| - name: Wait for MySQL to be ready | |
| run: | | |
| echo "Waiting for MySQL to be ready..." | |
| until mysqladmin ping -h 127.0.0.1 -P 3306 --silent; do | |
| sleep 3 | |
| done | |
| - name: Run database migrations | |
| run: php artisan migrate --force | |
| - name: Run feature & unit tests | |
| run: php artisan test |