App-GHGen

 view release on metacpan or  search on metacpan

lib/App/GHGen/Generator.pm  view on Meta::CPAN

          path: |
            build
            ~/.cache/ccache
          key: ${{ runner.os }}-${{ matrix.build-type }}-${{ hashFiles('**/CMakeLists.txt') }}

      - name: Configure CMake
        run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}

      - name: Build
        run: cmake --build build --config ${{ matrix.build-type }}

      - name: Run tests
        working-directory: build
        run: ctest -C ${{ matrix.build-type }} --output-on-failure
YAML
}

sub _generate_php_workflow() {
    return <<'YAML';
---
name: PHP CI

'on':
  push:
    branches:
      - main
      - develop
  pull_request:
    branches:
      - main
      - develop

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php-version:
          - '8.1'
          - '8.2'
          - '8.3'
    steps:
      - name: Checkout code
        uses: actions/checkout@v6

      - name: Setup PHP ${{ matrix.php-version }}
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-version }}
          extensions: mbstring, xml, ctype, json
          coverage: xdebug

      - name: Validate composer.json
        run: composer validate --strict

      - name: Cache Composer packages
        uses: actions/cache@v5
        with:
          path: vendor
          key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
          restore-keys: |
            ${{ runner.os }}-php-

      - name: Install dependencies
        run: composer install --prefer-dist --no-progress

      - name: Run PHPUnit tests
        run: vendor/bin/phpunit --coverage-text

      - name: Run PHP CodeSniffer
        run: vendor/bin/phpcs --standard=PSR12 src tests
        continue-on-error: true
YAML
}

=head1 AUTHOR

Nigel Horne E<lt>njh@nigelhorne.comE<gt>

L<https://github.com/nigelhorne>

=head1 LICENSE

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut

1;



( run in 1.301 second using v1.01-cache-2.11-cpan-140bd7fdf52 )