Skip to content

style: fix missing french translations (#436) #332

style: fix missing french translations (#436)

style: fix missing french translations (#436) #332

Workflow file for this run

name: Laravel WebAuthn workflow
on:
push:
branches:
- main
- next
- next-major
- beta
- alpha
pull_request:
types: [opened, synchronize, reopened]
release:
types:
- created
workflow_dispatch:
env:
default-php-version: '8.1'
default-laravel-version: '9.*'
semantic-node-version: 16
jobs:
tests:
runs-on: ubuntu-latest
name: PHP ${{ matrix.php-version }} | Laravel ${{ matrix.laravel-version }} (${{ matrix.psr7 }})
strategy:
fail-fast: false
matrix:
php-version: ['8.1','8.2']
laravel-version: [9.*,10.*]
psr7: ['guzzle']
include:
- php-version: '8.1'
laravel-version: '9.*'
psr7: 'nyholm'
- php-version: '8.1'
laravel-version: '9.*'
psr7: 'discovery'
- php-version: '8.2'
laravel-version: '10.*'
psr7: 'nyholm'
- php-version: '8.2'
laravel-version: '10.*'
psr7: 'discovery'
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
extensions: sqlite3, gmp
- name: Check PHP Version
run: php -v
- name: Check Composer Version
run: composer -V
- name: Check PHP Extensions
run: php -m
- name: Validate composer.json
run: composer validate
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer files
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }}-${{ matrix.php-version }}-${{ matrix.laravel-version }}
restore-keys: |
${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }}-${{ matrix.php-version }}-${{ matrix.laravel-version }}
${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }}-${{ matrix.php-version }}
${{ runner.os }}-composer-v4-${{ hashFiles('**/composer.json') }}
${{ runner.os }}-composer-v4-
- name: Update dependencies with Laravel ${{ matrix.laravel-version }}
run: |
export COMPOSER_ROOT_VERSION=dev-main
composer require "illuminate/support:${{ matrix.laravel-version }}" --no-update
- name: Use psr7 variant (nyholm)
if: matrix.psr7 == 'nyholm'
run: |
composer remove psr/http-factory-implementation --no-update
composer remove --dev guzzlehttp/psr7 --no-update
composer require --dev symfony/psr-http-message-bridge nyholm/psr7 --no-update
- name: Use psr7 variant (with php-http/discovery)
if: matrix.psr7 == 'discovery'
run: |
composer remove psr/http-factory-implementation --no-update
composer remove --dev guzzlehttp/psr7 --no-update
composer require --dev symfony/psr-http-message-bridge php-http/discovery laminas/laminas-diactoros php-http/curl-client --no-update
- name: Install dependencies
run: |
composer update --no-interaction --no-progress --prefer-dist
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run test suite
run: vendor/bin/phpunit -c phpunit.xml --log-junit ./results/results_${{ matrix.psr7 }}.xml --coverage-clover ./results/coverage_${{ matrix.psr7 }}.xml
- name: Fix results files
run: sed -i -e "s%$GITHUB_WORKSPACE/%%g" *.xml
working-directory: results
- name: Store results
if: matrix.php-version == env.default-php-version && matrix.laravel-version == env.default-laravel-version
uses: actions/upload-artifact@v3
with:
name: results
path: results
####################
# Sonarcloud
####################
reporting:
needs: tests
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.2']
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download results
uses: actions/download-artifact@v3
with:
name: results
path: results
- name: Set coverage list
id: coverage
run: |
SONAR_COVERAGE=$(ls -m --format=comma results/coverage*.xml | sed -e ':a;N;$!ba;s/\n//g; s/ //g;')
echo "::set-output name=list::$SONAR_COVERAGE"
- name: SonarCloud Scan
if: env.SONAR_TOKEN != ''
uses: SonarSource/sonarcloud-github-action@v1.9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: |
-Dsonar.php.tests.reportPath=./results/results_guzzle.xml
-Dsonar.php.coverage.reportPaths=${{ steps.coverage.outputs.list }}
####################
# Semantic release
####################
semantic-release:
needs: tests
runs-on: ubuntu-latest
name: Semantic release
if: github.event_name != 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Get all tags
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.semantic-node-version }}
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN_RELEASE: ${{ secrets.GH_TOKEN_RELEASE }}
with:
semantic_version: 19
extra_plugins: |
conventional-changelog-conventionalcommits@5.0.0
@semantic-release/changelog@6
semantic-release-github-pullrequest
- name: New release published
if: steps.semantic.outputs.new_release_published == 'true'
run: echo ${{ steps.semantic.outputs.new_release_version }}
- name: Store changelog file
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/upload-artifact@v3
with:
name: changelog
path: CHANGELOG.md