Skip to content

Commit

Permalink
Merge pull request #4200 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.0.5 Ready code
  • Loading branch information
MGatner authored Feb 1, 2021
2 parents 056a3b3 + 47d5eb2 commit 132b4ca
Show file tree
Hide file tree
Showing 731 changed files with 39,615 additions and 27,674 deletions.
34 changes: 21 additions & 13 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,27 @@

# git files
.gitattributes export-ignore
# .gitignore
.gitignore export-ignore

# helper config files
.travis.yml export-ignore
phpdoc.dist.xml export-ignore

# Misc other files
readme.rst
# Don't give admin files
.github/ export-ignore
admin/ export-ignore
contributing/ export-ignore
.editorconfig export-ignore
.nojekyll export-ignore export-ignore
CODE_OF_CONDUCT.md export-ignore
DCO.txt export-ignore
PULL_REQUEST_TEMPLATE.md export-ignore
stale.yml export-ignore
Vagrantfile.dist export-ignore

# They don't want all of our tests...
tests/bin/ export-ignore
tests/codeigniter/ export-ignore
tests/travis/ export-ignore
# They don't want our test files
tests/system/ export-ignore
utils/ export-ignore
rector.php export-ignore
phpunit.xml.dist export-ignore
phpstan.neon.dist export-ignore

# User Guide Source Files
user_guide_src
# The source user guide, either
user_guide_src/ export-ignore
phpdoc.dist.xml export-ignore
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
7 changes: 4 additions & 3 deletions .github/scripts/deploy-appstarter
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ git checkout master
rm -rf *

# Copy common files
releasable='app public writable env license.txt spark'
for fff in $releasable ; do
releasable='app public writable env LICENSE spark'
for fff in $releasable;
do
cp -Rf ${SOURCE}/$fff ./
done

# Copy repo-specific files
cp -Rf ${SOURCE}/admin/starter/. ./

# Commit the changes
git add .
git commit -m "Release ${RELEASE}"
Expand Down
7 changes: 4 additions & 3 deletions .github/scripts/deploy-framework
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ git checkout master
rm -rf *

# Copy common files
releasable='app public writable env license.txt spark system'
for fff in $releasable ; do
releasable='app public writable env LICENSE spark system'
for fff in $releasable;
do
cp -Rf ${SOURCE}/$fff ./
done

# Copy repo-specific files
cp -Rf ${SOURCE}/admin/framework/. ./

# Commit the changes
git add .
git commit -m "Release ${RELEASE}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: API Documentation
# When changes are pushed to the develop branch,
# build the current version of the API documentation
# with phpDocumentor and deploy it to the api branch.
name: Deploy API Documentation

on:
push:
Expand All @@ -10,10 +13,9 @@ on:
jobs:

build:
name: Generate API Docs
name: Deploy to api
if: (github.repository == 'codeigniter4/CodeIgniter4')
runs-on: ubuntu-latest

steps:
- name: Setup credentials
run: |
Expand All @@ -25,7 +27,7 @@ jobs:
with:
path: source

- name: Checkout api
- name: Checkout target
uses: actions/checkout@v2
with:
repository: codeigniter4/api
Expand All @@ -35,13 +37,12 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3
coverage: xdebug
php-version: '7.4'
extensions: intl

- name: Download GraphViz for phpDocumentor
- name: Install GraphViz for phpDocumentor
run: |
sudo apt-get install -yq graphviz
sudo apt install -yq graphviz
- name: Download phpDocumentor
run: |
Expand All @@ -50,21 +51,21 @@ jobs:
-L https://github.com/phpDocumentor/phpDocumentor/releases/download/v2.9.1/phpDocumentor.phar \
-o admin/phpDocumentor.phar
- name: Prepare API
- name: Prepare
run: |
cd ./api
rm -rf ./api/docs*
mkdir -p ./api/docs
git reset --hard master
- name: Make the new API docs
- name: Build
run: |
cd ./source
chmod +x admin/phpDocumentor.phar
admin/phpDocumentor.phar
cp -R ${GITHUB_WORKSPACE}/source/api/build/* ${GITHUB_WORKSPACE}/api/docs
- name: Deploy API
- name: Deploy
run: |
cd ./api
git add .
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
name: Deploy
# When a new Release is created, deploy relevant
# files to each of the generated repos.
name: Deploy Framework

on:
release:
types: [published]

jobs:
framework:
name: Deploy to framework
if: (github.repository == 'codeigniter4/CodeIgniter4')
runs-on: ubuntu-latest

steps:
- name: Identify
run: |
Expand All @@ -33,7 +36,7 @@ jobs:
run: ./source/.github/scripts/deploy-framework ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/framework ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@0.8.0
uses: actions/github-script@v3
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
Expand All @@ -50,8 +53,9 @@ jobs:
})
appstarter:
name: Deploy to appstarter
if: (github.repository == 'codeigniter4/CodeIgniter4')
runs-on: ubuntu-latest

steps:
- name: Identify
run: |
Expand All @@ -77,7 +81,7 @@ jobs:
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@0.8.0
uses: actions/github-script@v3
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/deploy-userguide-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# When changes are pushed to the develop branch,
# build the current version of the User Guide
# with Sphinx and deploy it to the gh-pages branch.
#
# @todo Consolidate checkouts
name: Deploy User Guide (latest)

on:
push:
branches:
- 'develop'
paths:
- 'user_guide_src/**'

jobs:
build:
name: Deploy to gh-pages
if: (github.repository == 'codeigniter4/CodeIgniter4')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

# Build the latest User Guide
- name: Build with Sphinx
uses: ammaraskar/[email protected]
with:
docs-folder: user_guide_src/

# Create an artifact of the html output
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: HTML Documentation
path: user_guide_src/build/html/

# Commit changes to the gh-pages branch
- name: Commit changes
run: |
git clone https://github.com/codeigniter4/CodeIgniter4.git --branch gh-pages --single-branch gh-pages
cp -r user_guide_src/build/html/* gh-pages/
cd gh-pages
git config --local user.email "[email protected]"
git config --local user.name "${GITHUB_ACTOR}"
git add .
# Ignore failures due to lack of changes
git commit -m "Update User Guide" -a || true
- name: Push changes
uses: ad-m/[email protected]
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.ACCESS_TOKEN }}
52 changes: 0 additions & 52 deletions .github/workflows/docs_nightly.yml

This file was deleted.

77 changes: 77 additions & 0 deletions .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# When a PR is opened or a push is made, perform
# a static analysis check on the code using PHPStan.
name: PHPStan

on:
pull_request:
branches:
- 'develop'
- '4.*'
paths:
- 'app/**'
- 'system/**'
- composer.json
- phpstan.neon.dist
push:
branches:
- 'develop'
- '4.*'
paths:
- 'app/**'
- 'system/**'
- composer.json
- phpstan.neon.dist

jobs:
build:
name: PHP ${{ matrix.php-versions }} Static Analysis
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl

- name: Use latest Composer
run: composer self-update

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

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Create composer cache directory
run: mkdir -p ${{ steps.composer-cache.outputs.dir }}

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Create PHPStan result cache directory
run: mkdir -p build/phpstan

- name: Cache PHPStan result cache directory
uses: actions/cache@v2
with:
path: build/phpstan
key: ${{ runner.os }}-phpstan-${{ github.sha }}
restore-keys: ${{ runner.os }}-phpstan-

- name: Install dependencies
run: composer update --ansi --no-interaction

- name: Run static analysis
run: vendor/bin/phpstan analyse
Loading

0 comments on commit 132b4ca

Please sign in to comment.