Skip to content

Commit

Permalink
Updated workflow configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
batumibiz committed Nov 1, 2024
1 parent f57fa3f commit 66cf2cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 40 deletions.
38 changes: 2 additions & 36 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'

- name: Get composer cache directory
id: composer-cache
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'

- name: Get composer cache directory
id: composer-cache
Expand All @@ -59,37 +59,3 @@ jobs:

- name: Static Analysis
run: composer static-analysis

taint-analysis:
name: Taint Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Get composer cache directory
id: composer-cache
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: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --no-interaction

- name: Taint Analysis
run: composer taint-analysis

- name: Upload Security Analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ jobs:
run: composer install --no-progress --no-interaction --ignore-platform-req=php

- name: Test
if: matrix.php-versions != '8.2'
if: matrix.php-versions != '8.3'
run: composer test
continue-on-error: true

- name: Test with Coverage
if: matrix.php-versions == '8.2'
if: matrix.php-versions == '8.3'
working-directory: ./
run: |
composer test-coverage
sed -i 's/\/home\/runner\/work\/captcha\/captcha\//\/github\/workspace\//g' report.xml
sed -i 's/\/home\/runner\/work\/captcha\/captcha\//\/github\/workspace\//g' clover.xml
- name: Scan code with SonarCloud
if: matrix.php-versions == '8.2'
if: matrix.php-versions == '8.3'
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -69,7 +69,7 @@ jobs:
-Dsonar.php.coverage.reportPaths=clover.xml
- name: Test with latest dependencies
if: matrix.php-versions == '8.2'
if: matrix.php-versions == '8.3'
run: |
composer update
composer test

0 comments on commit 66cf2cc

Please sign in to comment.