diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7a108a91..0f0dadb5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,10 +7,3 @@ updates: labels: - "dependencies" - "automerge" - - package-ecosystem: npm - directory: "/" - schedule: - interval: daily - labels: - - "dependencies" - - "automerge" diff --git a/.github/workflows/codesniffer.yml b/.github/workflows/codesniffer.yml new file mode 100644 index 00000000..dfc76ff5 --- /dev/null +++ b/.github/workflows/codesniffer.yml @@ -0,0 +1,15 @@ +name: "Codesniffer" + +on: + pull_request: + + push: + branches: ["*"] + + schedule: + - cron: "0 8 * * 1" + +jobs: + codesniffer: + name: "Codesniffer" + uses: contributte/.github/.github/workflows/codesniffer.yml@v1 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..00131869 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,17 @@ +name: "Coverage" + +on: + pull_request: + + push: + branches: ["*"] + + schedule: + - cron: "0 8 * * 1" + +jobs: + coverage: + name: "Phpunit" + uses: contributte/.github/.github/workflows/phpunit-coverage.yml@v1 + with: + make: "init coverage" diff --git a/.github/workflows/node.yaml b/.github/workflows/node.yaml deleted file mode 100644 index 0a630c44..00000000 --- a/.github/workflows/node.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: "Node" - -on: - pull_request: - paths-ignore: - - ".docs/**" - push: - branches: - - "*" - schedule: - - cron: "0 8 * * 1" # At 08:00 on Monday - -jobs: - webpack: - name: "Webpack Build" - runs-on: "ubuntu-latest" - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - - - name: "Use Node.js" - uses: "actions/setup-node@v1" - with: - node-version: "15.x" - - run: npm ci - - run: npm run build diff --git a/.github/workflows/php.yaml b/.github/workflows/php.yaml deleted file mode 100644 index 28ddf5b3..00000000 --- a/.github/workflows/php.yaml +++ /dev/null @@ -1,192 +0,0 @@ -name: "PHP" - -on: - pull_request: - paths-ignore: - - ".docs/**" - push: - branches: - - "*" - schedule: - - cron: "0 8 * * 1" # At 08:00 on Monday - -env: - extensions: "json" - cacheVersion: "1" - composerVersion: "v2" - composerInstall: "composer install" - -jobs: - qa: - name: "Quality Assurance" - runs-on: "${{ matrix.operating-system }}" - - strategy: - matrix: - php-versions: [ "8.0" ] - operating-system: [ "ubuntu-latest" ] - fail-fast: false - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - - - name: "Setup PHP cache environment" - id: "extcache" - uses: "shivammathur/cache-extensions@v1" - with: - php-version: "${{ matrix.php-versions }}" - extensions: "${{ env.extensions }}" - key: "${{ env.cacheVersion }}" - - - name: "Cache PHP extensions" - uses: "actions/cache@v2" - with: - path: "${{ steps.extcache.outputs.dir }}" - key: "${{ steps.extcache.outputs.key }}" - restore-keys: "${{ steps.extcache.outputs.key }}" - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - php-version: "${{ matrix.php-versions }}" - extensions: "${{ env.extensions }}" - tools: "composer:${{ env.composerVersion }} " - - - name: "Setup problem matchers for PHP" - run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"' - - - name: "Get Composer cache directory" - id: "composercache" - run: 'echo "::set-output name=dir::$(composer config cache-files-dir)"' - - - name: "Cache PHP dependencies" - uses: "actions/cache@v2" - with: - path: "${{ steps.composercache.outputs.dir }}" - key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}" - restore-keys: "${{ runner.os }}-composer-" - - - name: "Validate Composer" - run: "composer validate" - - - name: "Install dependencies" - run: "${{ env.composerInstall }}" - - - name: "Coding Standard" - run: "make cs" - - static-analysis: - name: "Static analysis" - runs-on: "${{ matrix.operating-system }}" - - strategy: - matrix: - php-versions: [ "8.0" ] - operating-system: [ "ubuntu-latest" ] - fail-fast: false - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - - - name: "Setup PHP cache environment" - id: "extcache" - uses: "shivammathur/cache-extensions@v1" - with: - php-version: "${{ matrix.php-versions }}" - extensions: "${{ env.extensions }}" - key: "${{ env.cacheVersion }}" - - - name: "Cache PHP extensions" - uses: "actions/cache@v2" - with: - path: "${{ steps.extcache.outputs.dir }}" - key: "${{ steps.extcache.outputs.key }}" - restore-keys: "${{ steps.extcache.outputs.key }}" - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - php-version: "${{ matrix.php-versions }}" - extensions: "${{ env.extensions }}" - tools: "composer:${{ env.composerVersion }} " - - - name: "Setup problem matchers for PHP" - run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"' - - - name: "Get Composer cache directory" - id: "composercache" - run: 'echo "::set-output name=dir::$(composer config cache-files-dir)"' - - - name: "Cache PHP dependencies" - uses: "actions/cache@v2" - with: - path: "${{ steps.composercache.outputs.dir }}" - key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}" - restore-keys: "${{ runner.os }}-composer-" - - - name: "Install dependencies" - run: "${{ env.composerInstall }}" - - - name: "PHPStan" - run: "make phpstan" - - tests: - name: "Tests" - runs-on: "${{ matrix.operating-system }}" - - strategy: - matrix: - php-versions: [ "8.0" ] - operating-system: [ "ubuntu-latest" ] - fail-fast: false - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - - - name: "Setup PHP cache environment" - id: "extcache" - uses: "shivammathur/cache-extensions@v1" - with: - php-version: "${{ matrix.php-versions }}" - extensions: "${{ env.extensions }}" - key: "${{ env.cacheVersion }}" - - - name: "Cache PHP extensions" - uses: "actions/cache@v2" - with: - path: "${{ steps.extcache.outputs.dir }}" - key: "${{ steps.extcache.outputs.key }}" - restore-keys: "${{ steps.extcache.outputs.key }}" - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - php-version: "${{ matrix.php-versions }}" - extensions: "${{ env.extensions }}" - tools: "composer:${{ env.composerVersion }} " - - - name: "Setup problem matchers for PHP" - run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"' - - - name: "Get Composer cache directory" - id: "composercache" - run: 'echo "::set-output name=dir::$(composer config cache-files-dir)"' - - - name: "Cache PHP dependencies" - uses: "actions/cache@v2" - with: - path: "${{ steps.composercache.outputs.dir }}" - key: "${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}" - restore-keys: "${{ runner.os }}-composer-" - - - name: "Install dependencies" - run: "${{ env.composerInstall }}" - - - name: "Setup problem matchers for PHPUnit" - run: 'echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"' - - - name: "Tests" - run: "make tests" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 00000000..81aa465b --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,17 @@ +name: "Phpstan" + +on: + pull_request: + + push: + branches: ["*"] + + schedule: + - cron: "0 8 * * 1" + +jobs: + phpstan: + name: "Phpstan" + uses: contributte/.github/.github/workflows/phpstan.yml@v1 + with: + make: "init phpstan" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..2143dc66 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,25 @@ +name: "Phpunit" + +on: + pull_request: + + push: + branches: [ "*" ] + + schedule: + - cron: "0 8 * * 1" + +jobs: + test82: + name: "Phpunit" + uses: contributte/.github/.github/workflows/phpunit.yml@v1 + with: + php: "8.2" + make: "init tests" + + test81: + name: "Phpunit" + uses: contributte/.github/.github/workflows/phpunit.yml@v1 + with: + php: "8.1" + make: "init tests"