Skip to content

Commit

Permalink
updated readme and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
deemonic committed Oct 19, 2024
1 parent e347761 commit 09c6d8e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 33 deletions.
47 changes: 15 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,27 @@
name: Tests
name: Run Tests

on: ["push", "pull_request"]
on: [push, pull_request]

jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: ["8.3"]
dependency-version: [prefer-lowest, prefer-stable]

name: Tests P${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }}
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
# Step 1: Check out the repository
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
# Step 2: Set up PHP
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, mbstring, zip
coverage: none

- name: Get Composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: dependencies-php-${{ matrix.php }}-os-${{ matrix.os }}-version-${{ matrix.dependency-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: dependencies-php-${{ matrix.php }}-os-${{ matrix.os }}-version-${{ matrix.dependency-version }}-composer-
php-version: "8.0" # Set your desired PHP version
extensions: mbstring, dom, zip

- name: Install Composer dependencies
run: composer update --${{ matrix.dependency-version }} --no-interaction --prefer-dist
# Step 3: Install Composer dependencies
- name: Install dependencies
run: composer install --no-interaction --prefer-dist

- name: Run Tests
# Step 4: Run PHPUnit tests
- name: Run tests
run: php ./vendor/bin/phpunit
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<img src="./assets/icon.png" alt="Alt text" width="150" height="150"/>
<p align="center">
<img src="./assets/icon.png" alt="Alt text" width="150" height="150"/>
<p align="center">
<a href="https://github.com/Blaspsoft/blasp/actions/workflows/main.yml"><img alt="GitHub Workflow Status (main)" src="https://github.com/Blaspsoft/blasp/actions/workflows/main.yml/badge.svg"></a>
</p>
</p>

# Blasp - Profanity Filter for Laravel

Expand Down

0 comments on commit 09c6d8e

Please sign in to comment.