Skip to content

Commit

Permalink
Merge pull request #6011 from getkirby/release/4.0.0
Browse files Browse the repository at this point in the history
4.0.0
  • Loading branch information
bastianallgeier authored Nov 28, 2023
2 parents 1045a79 + 71bb0a1 commit 40eae8e
Show file tree
Hide file tree
Showing 1,851 changed files with 74,561 additions and 34,301 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ trim_trailing_whitespace = true
indent_size = 4
insert_final_newline = true

[*.vue.php]
indent_size = 2
insert_final_newline = false

[*.yml]
indent_style = space

Expand Down
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ tests/ export-ignore
panel/.env.example export-ignore
panel/.eslintrc.js export-ignore
panel/.prettierrc.json export-ignore
panel/dist/ui export-ignore
panel/jsconfig.json export-ignore
panel/lab export-ignore
panel/package-lock.json export-ignore
panel/package.json export-ignore
panel/public export-ignore
Expand All @@ -23,7 +26,6 @@ panel/scripts export-ignore
panel/src export-ignore
panel/vite.config.js export-ignore
panel/vitest.setup.js export-ignore
panel/jsconfig.json export-ignore

# other
.tx export-ignore
Expand Down
93 changes: 67 additions & 26 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,41 @@ on:
- "!scripts/**"
workflow_call:

workflow_dispatch:

jobs:
tests:
name: "Unit tests - PHP ${{ matrix.php }}"

# if on pull request, only run if from a fork
# (our own repo is covered by the push event)
# run job only under the following conditions:
# - can be triggered manually from any repository
# - if on pull request, only run if from a fork
# (our own repo is covered by the push event)
# - if on push, only run CI automatically for the
# main getkirby/kirby repo and for forks
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository
) ||
(
github.event_name == 'push' &&
(github.repository == 'getkirby/kirby' || github.repository_owner != 'getkirby')
)
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
php: ["8.0", "8.1", "8.2"]
php: ["8.1", "8.2", "8.3"]
env:
extensions: mbstring, ctype, curl, gd, apcu, memcached
ini: apc.enabled=1, apc.enable_cli=1, pcov.directory=., "pcov.exclude=\"~(vendor|tests)~\""

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3
with:
fetch-depth: 2

Expand All @@ -66,27 +79,27 @@ jobs:

- name: Setup PHP cache environment
id: ext-cache
uses: shivammathur/cache-extensions@7d0d256df12c7817667b98a7036ddcd7d5b7343b # pin@v1
uses: shivammathur/cache-extensions@d776e47f06e6e567f0c77a43f9054fb0753993d7 # pin@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: php-v1

- name: Cache PHP extensions
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin@v3
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # pin@v3
with:
path: ${{ steps.ext-cache.outputs.dir }}
key: ${{ steps.ext-cache.outputs.key }}
restore-keys: ${{ steps.ext-cache.outputs.key }}

- name: Setup PHP environment
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # pin@v2
uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # pin@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: ${{ env.ini }}
coverage: pcov
tools: phpunit:9.5.26, psalm:5.1.0
tools: phpunit:9.5.26, psalm:5.15.0

- name: Setup problem matchers
run: |
Expand All @@ -95,7 +108,7 @@ jobs:
- name: Cache analysis data
id: finishPrepare
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin@v3
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # pin@v3
with:
path: ~/.cache/psalm
key: backend-analysis-${{ matrix.php }}
Expand Down Expand Up @@ -127,50 +140,61 @@ jobs:

- name: Upload code scanning results to GitHub
if: always() && steps.finishPrepare.outcome == 'success' && github.repository == 'getkirby/kirby'
uses: github/codeql-action/upload-sarif@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # pin@v2
uses: github/codeql-action/upload-sarif@fdcae64e1484d349b3366718cdfef3d404390e85 # pin@v2
with:
sarif_file: sarif

analysis:
name: "Code Quality"

# if on pull request, only run if from a fork
# (our own repo is covered by the push event)
# run job only under the following conditions:
# - can be triggered manually from any repository
# - if on pull request, only run if from a fork
# (our own repo is covered by the push event)
# - if on push, only run CI automatically for the
# main getkirby/kirby repo and for forks
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository
) ||
(
github.event_name == 'push' &&
(github.repository == 'getkirby/kirby' || github.repository_owner != 'getkirby')
)
runs-on: ubuntu-latest
timeout-minutes: 5
env:
php: "8.0"
php: "8.1"
extensions: mbstring, ctype, curl, gd, apcu, memcached

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3

- name: Preparations
run: mkdir sarif

- name: Setup PHP cache environment
id: ext-cache
uses: shivammathur/cache-extensions@7d0d256df12c7817667b98a7036ddcd7d5b7343b # pin@v1
uses: shivammathur/cache-extensions@d776e47f06e6e567f0c77a43f9054fb0753993d7 # pin@v1
with:
php-version: ${{ env.php }}
extensions: ${{ env.extensions }}
key: php-analysis-v1

- name: Cache PHP extensions
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin@v3
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # pin@v3
with:
path: ${{ steps.ext-cache.outputs.dir }}
key: ${{ steps.ext-cache.outputs.key }}
restore-keys: ${{ steps.ext-cache.outputs.key }}

- name: Setup PHP environment
id: finishPrepare
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # pin@v2
uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # pin@v2
with:
php-version: ${{ env.php }}
extensions: ${{ env.extensions }}
Expand All @@ -197,32 +221,49 @@ jobs:

- name: Upload code scanning results to GitHub
if: always() && steps.finishPrepare.outcome == 'success' && github.repository == 'getkirby/kirby'
uses: github/codeql-action/upload-sarif@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # pin@v2
uses: github/codeql-action/upload-sarif@fdcae64e1484d349b3366718cdfef3d404390e85 # pin@v2
with:
sarif_file: sarif

coding-style:
name: "Coding Style"

# run job only under the following conditions:
# - can be triggered manually from any repository
# - if on pull request, only run if from a fork
# (our own repo is covered by the push event)
# - if on push, only run CI automatically for the
# main getkirby/kirby repo and for forks
if: >
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository
) ||
(
github.event_name == 'push' &&
(github.repository == 'getkirby/kirby' || github.repository_owner != 'getkirby')
)
runs-on: ubuntu-latest
timeout-minutes: 5
env:
php: "8.0"
php: "8.1"

steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # pin@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3

- name: Setup PHP environment
uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # pin@v2
uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # pin@v2
with:
php-version: ${{ env.php }}
coverage: none
tools: php-cs-fixer:3.13.0

- name: Cache analysis data
id: finishPrepare
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # pin@v3
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # pin@v3
with:
path: ~/.php-cs-fixer
key: coding-style
Expand Down
55 changes: 36 additions & 19 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,28 @@ on:
- "!panel/scripts/**"
workflow_call:

workflow_dispatch:

jobs:
tests:
name: "Unit tests"

# if on pull request, only run if from a fork
# (our own repo is covered by the push event)
# run job only under the following conditions:
# - can be triggered manually from any repository
# - if on pull request, only run if from a fork
# (our own repo is covered by the push event)
# - if on push, only run CI automatically for the
# main getkirby/kirby repo and for forks
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository
) ||
(
github.event_name == 'push' &&
(github.repository == 'getkirby/kirby' || github.repository_owner != 'getkirby')
)
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -50,29 +63,33 @@ jobs:

- name: Run JavaScript unit tests
if: always() && steps.finishPrepare.outcome == 'success'
run: npm run test:unit:coverage
run: npm run test:unit
working-directory: panel

# TODO: Disabled until Vitest coverage reporting is accurate and
# Kirby's frontend tests are useful enough that we need this metric
# - name: Upload coverage results to Codecov
# env:
# token: ${{ secrets.CODECOV_TOKEN }}
# if: env.token != ''
# uses: codecov/codecov-action@858dd794fbb81941b6d60b0dca860878cba60fa9 # pin@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }} # for better reliability if the GitHub API is down
# fail_ci_if_error: true
# files: ${{ github.workspace }}/panel/coverage/lcov.info
# flags: frontend

coding-style:
name: "Coding Style"

# run job only under the following conditions:
# - can be triggered manually from any repository
# - if on pull request, only run if from a fork
# (our own repo is covered by the push event)
# - if on push, only run CI automatically for the
# main getkirby/kirby repo and for forks
if: >
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name != github.repository
) ||
(
github.event_name == 'push' &&
(github.repository == 'getkirby/kirby' || github.repository_owner != 'getkirby')
)
runs-on: ubuntu-latest
timeout-minutes: 5
env:
php: "8.0"
php: "8.1"

steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# build files
/dist.zip
/kirby.zip
/panel/tmp

# cs fixer
.php-cs-fixer.cache
Expand Down
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[o:getkirby:p:panel:r:v3]
[o:getkirby:p:panel:r:v4]
file_filter = i18n/translations/<lang>.json
source_file = i18n/translations/en.json
source_lang = en
Expand Down
Loading

0 comments on commit 40eae8e

Please sign in to comment.