Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twig #146

Merged
merged 3 commits into from
Aug 1, 2020
Merged

Twig #146

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: PHP ${{ matrix.php-versions }}
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
php-versions: ['7.3', '7.4']
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down Expand Up @@ -69,20 +69,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Download coverage
uses: actions/download-artifact@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
name: coverage
php-version: 7.4
coverage: pcov
extensions: curl,json,mbstring,uopz
tools: pecl,phpunit

- name: Install Composer deps
run: composer update --no-interaction --no-suggest

- name: Run test suite
run: composer run-script test-sonar

- name: Code coverage Scan
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Change paths in clover.xml
run: |
sed -i 's+/home/runner/work/bundle-stripe/bundle-stripe+/github/workspace+g' ./var/coverage/clover.xml

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@v1.1
uses: sonarsource/sonarcloud-github-action@v1.3
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ atlassian-ide-plugin.xml

*.pem

index.html
/index.html

/coverage.xml
29 changes: 28 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="phpdrafter" default="setup">
<project name="PHPDraft" default="setup">
<target name="setup" depends="clean"/>

<target name="clean" unless="clean.done" description="Cleanup build artifacts">
Expand Down Expand Up @@ -51,6 +51,7 @@
<fileset dir="${project.basedir}/src/">
<exclude name="**/*Test.php*"/>
<include name="**/*.php"/>
<include name="**/*.twig"/>
<include name="**/*.phtml"/>
<include name="**/*.js*"/>
<include name="**/*.css*"/>
Expand All @@ -75,6 +76,32 @@
<include name="**/*.php"/>
</fileset>
</copy>
<copy todir="${project.basedir}/build/phar/phpdraft/src/Twig">
<fileset dir="vendor/twig/twig/src">
<include name="**/*.php"/>
<exclude name="Test/**"/>
</fileset>
</copy>
<copy todir="${project.basedir}/build/phar/phpdraft/src/Twig/Extra/Markdown">
<fileset dir="vendor/twig/markdown-extra/src">
<include name="**/*.php"/>
</fileset>
</copy>
<copy todir="${project.basedir}/build/phar/phpdraft/src/MatthiasMullie/Minify">
<fileset dir="vendor/matthiasmullie/minify/src">
<include name="**/*.php"/>
</fileset>
</copy>
<copy todir="${project.basedir}/build/phar/phpdraft/src/MatthiasMullie/data">
<fileset dir="vendor/matthiasmullie/minify/data">
<include name="**/*.txt"/>
</fileset>
</copy>
<copy todir="${project.basedir}/build/phar/phpdraft/src/MatthiasMullie/PathConverter">
<fileset dir="vendor/matthiasmullie/path-converter/src">
<include name="**/*.php"/>
</fileset>
</copy>
<copy todir="${project.basedir}/build/phar/phpdraft/src/Psr/Log">
<fileset dir="vendor/psr/log/Psr/Log">
<include name="**/*.php"/>
Expand Down
12 changes: 9 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.3",
"ql/uri-template": "~1.0",
"vanilla/garden-cli": "~2.0",
"michelf/php-markdown": "~1.9",
"lukasoppermann/http-status": "~2.0",
"ext-json": "*",
"ext-curl": "*"
"ext-curl": "*",
"twig/twig": "^3.0",
"twig/markdown-extra": "^3.0",
"matthiasmullie/minify": "^1.3"
},
"require-dev": {
"lunr/halo": "dev-master",
"phpunit/phpunit": "~8.0",
"phpunit/phpunit": "~9.0",
"theseer/autoload": "~1.0",
"phing/phing": "~2.0",
"phpstan/phpstan-phpunit": "^0.12.6",
Expand All @@ -38,6 +41,9 @@
"test": [
"vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover=coverage.xml"
],
"test-sonar": [
"vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover=./var/coverage/clover.xml"
],
"phar": [
"vendor/bin/phing phar",
"sha256sum build/out/*"
Expand Down
Loading