Create tests.yml
This commit is contained in:
		
							
								
								
									
										22
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
name: PHPUnit Tests
 | 
			
		||||
 | 
			
		||||
on: [push]
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  phpunit-tests:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: actions/checkout@v1
 | 
			
		||||
    - name: Copy .env
 | 
			
		||||
      run: php -r "file_exists('.env') || copy('.env.testing', '.env');"
 | 
			
		||||
    - name: Install composer
 | 
			
		||||
      run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
 | 
			
		||||
    - name: Create Database
 | 
			
		||||
      run: |
 | 
			
		||||
        mkdir -p database
 | 
			
		||||
        touch database/database.sqlite
 | 
			
		||||
    - name: Execute tests
 | 
			
		||||
      env:
 | 
			
		||||
        DB_CONNECTION: sqlite
 | 
			
		||||
        DB_DATABASE: database/database.sqlite
 | 
			
		||||
      run: vendor/bin/phpunit
 | 
			
		||||
		Reference in New Issue
	
	Block a user