From 09c6d8e16f79a6582694a2bf7b2aa9b6741b282c Mon Sep 17 00:00:00 2001 From: deemonic Date: Sat, 19 Oct 2024 23:15:09 +0100 Subject: [PATCH] updated readme and workflow --- .github/workflows/main.yml | 47 ++++++++++++-------------------------- README.md | 7 +++++- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 016e90c..2385b78 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/README.md b/README.md index 3d77e56..715436c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -Alt text +

+ Alt text +

+ GitHub Workflow Status (main) +

+

# Blasp - Profanity Filter for Laravel