Skip to content

Commit

Permalink
CI: use default github token for tests in PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothkannans committed Nov 18, 2024
1 parent 0fe75ae commit 09b559b
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 4 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Tests

on:
pull_request:
branches: [ "main" ]

jobs:
laravel-tests:

runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@2.31.1
with:
php-version: '8.3'
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install PHP Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Install Javascript Packages
run: npm install && npm run build
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php artisan test
2 changes: 0 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
laravel-tests:
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@
</picture>
</p>

# Vinkas Lauth
<p align="center">
<a href="https://github.com/vinkashq/lauth/actions/workflows/tests.yml"><img src="Tests" alt="https://github.com/vinkashq/lauth/actions/workflows/tests.yml/badge.svg" /></a>
<a href="https://github.com/vinkashq/lauth/actions/workflows/github-code-scanning/codeql"><img src="CodeQL" alt="https://github.com/vinkashq/lauth/actions/workflows/github-code-scanning/codeql/badge.svg" /></a>
<a href="https://github.styleci.io/repos/67142226?branch=main"><img src="StyleCI" alt="https://github.styleci.io/repos/67142226/shield?branch=main" /></a>
</p>

[![Tests](https://github.com/vinkashq/lauth/actions/workflows/tests.yml/badge.svg)](https://github.com/vinkashq/lauth/actions/workflows/tests.yml) [![CodeQL](https://github.com/vinkashq/lauth/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/vinkashq/lauth/actions/workflows/github-code-scanning/codeql) [![StyleCI](https://github.styleci.io/repos/67142226/shield?branch=main)](https://github.styleci.io/repos/67142226?branch=main) [![Docker Pulls](https://img.shields.io/docker/pulls/vinkas/lauth?logo=docker&logoColor=1D63ED&label=Pulls&labelColor=E5F2FC&color=1D63ED)](https://hub.docker.com/r/vinkas/lauth) [![Packagist Version](https://img.shields.io/packagist/v/vinkas/lauth?logo=packagist&logoColor=000000&label=version&labelColor=d9e0f3&color=f28d1a)](https://packagist.org/packages/vinkas/lauth)
<p align="center">
<a href="https://hub.docker.com/r/vinkas/lauth"><img src="Docker Pulls" alt="https://img.shields.io/docker/pulls/vinkas/lauth?logo=docker&logoColor=1D63ED&label=Pulls&labelColor=E5F2FC&color=1D63ED" /></a>
<a href="https://packagist.org/packages/vinkas/lauth"><img src="Packagist Version" alt="https://img.shields.io/packagist/v/vinkas/lauth?logo=packagist&logoColor=000000&label=version&labelColor=d9e0f3&color=f28d1a" /></a>
</p>

# Vinkas Lauth

Laravel authentication server

Expand Down

0 comments on commit 09b559b

Please sign in to comment.