Deps: Update all non-major dependencies #5148
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'π Web Twig: Code Quality Checks' | |
on: | |
# Run this workflow on push to branches only (not tags) | |
push: | |
branches: | |
- '**' | |
paths: | |
- packages/web-twig/** | |
# Changes in SVG icons also affect snapshots in web-twig package | |
# e.g. svg content is generated into the snapshot | |
- packages/icons/** | |
pull_request: | |
paths: | |
- packages/web-twig/** | |
# Changes in SVG icons also affect snapshots in web-twig package | |
# e.g. svg content is generated into the snapshot | |
- packages/icons/** | |
jobs: | |
prepare-icons: | |
name: π± Preparing Icons | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node and Install Dependencies | |
uses: ./.github/actions/setup-install | |
- name: Build Icons | |
working-directory: ./packages/icons | |
run: yarn build | |
- name: Save built icons | |
uses: actions/upload-artifact@v4 | |
with: | |
name: icons-dist | |
path: ./packages/icons/dist | |
unit-tests: | |
needs: [prepare-icons] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: ['8.1', '8.2', '8.3'] | |
dependencies: [''] | |
name: π§ͺ Unit Testing - PHP ${{ matrix.php-version }} ${{ matrix.dependencies }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download built icons | |
uses: actions/download-artifact@v4 | |
with: | |
name: icons-dist | |
path: ./packages/icons/dist | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: json, mbstring | |
coverage: xdebug | |
- name: Install dependencies | |
working-directory: ./packages/web-twig | |
run: composer update --no-progress --no-interaction ${{ matrix.dependencies }} | |
- name: Copy Assets | |
working-directory: ./packages/web-twig | |
run: cp ../icons/dist/svg/* ./static | |
- name: Run tests | |
working-directory: ./packages/web-twig | |
run: | | |
composer phpunit:coverage | |
# Publish code coverage after the code is public | |
- name: Submit coverage to Coveralls | |
working-directory: ./packages/web-twig | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: ${{ github.job }}-PHP-${{ matrix.php-version }} ${{ matrix.dependencies }} | |
run: | | |
composer global require php-coveralls/php-coveralls | |
~/.composer/vendor/bin/php-coveralls --coverage_clover=coverage/clover.xml --json_path=coverage/coveralls-upload.json -v | |
finalize-tests: | |
name: π Finalizing Tests | |
needs: [unit-tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Notify Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true | |
flag-name: web-twig | |
carryforward: web, web-react, analytics, design-tokens, icons, common, codemods, form-validations | |
codestyle: | |
name: 'π Analyzing Code Style and Types' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
extensions: json, mbstring | |
- name: Install dependencies | |
working-directory: ./packages/web-twig | |
run: composer update --no-progress | |
- name: Run lint | |
working-directory: ./packages/web-twig | |
run: composer lint | |
- name: Run checks | |
working-directory: ./packages/web-twig | |
run: composer analyze |