251201
This commit is contained in:
24
.github/workflows/close-pull-request.yml
vendored
Normal file
24
.github/workflows/close-pull-request.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Close Pull Request
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Close PR with nice message
|
||||
run: gh pr close ${{ env.ISSUE }} -c "${{ env.COMMENT }}"
|
||||
working-directory: ${{ github.workspace }}
|
||||
env:
|
||||
COMMENT: >
|
||||
Thank you for your pull request. However, you have submitted your PR on a read-only
|
||||
split of <code>codeigniter4/CodeIgniter4</code>. This repository, unfortunately, does
|
||||
not accept PRs. Please submit your PR at https://github.com/codeigniter4/CodeIgniter4
|
||||
repository.<br/><br/>Thank you.
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ISSUE: ${{ github.event.pull_request.html_url }}
|
||||
51
.github/workflows/phpunit.yml
vendored
Normal file
51
.github/workflows/phpunit.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: PHPUnit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
main:
|
||||
name: Build and test
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['8.1', '8.3']
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: (! contains(github.event.head_commit.message, '[ci skip]'))
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP, with composer and extensions
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: composer, pecl, phpunit
|
||||
extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3
|
||||
coverage: xdebug
|
||||
|
||||
- name: Get composer cache directory
|
||||
id: composer-cache
|
||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||
|
||||
- name: Cache composer dependencies
|
||||
uses: actions/cache@v2
|
||||
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 --prefer-dist --optimize-autoloader
|
||||
# To prevent rate limiting you may need to supply an OAuth token in Settings > Secrets
|
||||
# env:
|
||||
# https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens
|
||||
# COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
|
||||
|
||||
- name: Test with phpunit
|
||||
run: vendor/bin/phpunit --coverage-text
|
||||
Reference in New Issue
Block a user