Skip to content

Added support for composer create-project #161

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

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
34fcb22
Init.
tannguyen04 May 9, 2024
a77dcf7
Init Customizer.
tannguyen04 May 9, 2024
8984a8c
Init.
tannguyen04 May 9, 2024
fdff2d7
Display summary.
tannguyen04 May 9, 2024
ce64824
Process readme.
tannguyen04 May 10, 2024
1114559
Remove command wrapper.
tannguyen04 May 10, 2024
869627f
Add convert string helper function.
tannguyen04 May 10, 2024
cdffecc
Init internal replacement.
tannguyen04 May 10, 2024
118d2f0
Namespace
tannguyen04 May 10, 2024
0b6d2d7
Namespace
tannguyen04 May 10, 2024
e10be88
UPDATE internal replacement.
tannguyen04 May 10, 2024
465c1fd
Update internal replacement
tannguyen04 May 10, 2024
c6f6026
update composer
tannguyen04 May 10, 2024
516b571
update composer
tannguyen04 May 10, 2024
30d80ed
Update internal replacement.
tannguyen04 May 10, 2024
f4bef22
Update
tannguyen04 May 10, 2024
b8a85f6
Update
tannguyen04 May 10, 2024
5f19135
Update
tannguyen04 May 10, 2024
dccf3af
Test.
tannguyen04 May 10, 2024
0028da0
Init lint for scaffold.
tannguyen04 May 13, 2024
e779f58
Implement lint scaffold in composer.
tannguyen04 May 13, 2024
af6b6e1
Add phpunit dependency.
tannguyen04 May 13, 2024
2ad4eef
Init phpunit test.
tannguyen04 May 13, 2024
343264d
Update Unit tests.
tannguyen04 May 13, 2024
8d6b62b
Update Unit test.
tannguyen04 May 13, 2024
a51605a
Update phpunit test.
tannguyen04 May 13, 2024
f1593b4
Add test.
tannguyen04 May 13, 2024
f68d7ae
test
tannguyen04 May 13, 2024
f82aad8
test
tannguyen04 May 13, 2024
dde0b8f
test
tannguyen04 May 13, 2024
14a0f60
test
tannguyen04 May 13, 2024
2ecf549
test
tannguyen04 May 13, 2024
f068caa
test
tannguyen04 May 13, 2024
19ccebe
test
tannguyen04 May 13, 2024
b210690
test
tannguyen04 May 13, 2024
7b81fb5
test
tannguyen04 May 13, 2024
c198706
test
tannguyen04 May 13, 2024
ab57114
test
tannguyen04 May 13, 2024
79ebced
test
tannguyen04 May 13, 2024
829d07a
Test.
tannguyen04 May 13, 2024
8c9a89f
test.
tannguyen04 May 13, 2024
45509e0
Test.
tannguyen04 May 13, 2024
99909c1
Remove init and bats.
tannguyen04 May 13, 2024
c6b573e
test.
tannguyen04 May 13, 2024
f3899d4
test
tannguyen04 May 14, 2024
22e2318
test
tannguyen04 May 14, 2024
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
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ job-test: &job-test
sudo ldconfig
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> $BASH_ENV

- run:
name: Setup composer.json
command: |
rm composer.json
mv composer.dist.json composer.json

- run:
name: Assemble the codebase
command: .devtools/assemble.sh
Expand Down
3 changes: 2 additions & 1 deletion .devtools/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ echo "==============================="
echo

info "Stopping previously started services, if any."
killall -9 php >/dev/null 2>&1 || true
# shellcheck disable=SC2009
kill -SIGKILL "$(ps aux | grep 'php -S' | grep -v grep | awk '{print $2}')" >/dev/null 2>&1 || true

info "Starting the PHP webserver."
nohup php -S "${WEBSERVER_HOST}:${WEBSERVER_PORT}" -t "$(pwd)/build/web" "$(pwd)/build/web/.ht.router.php" >/tmp/php.log 2>&1 &
Expand Down
3 changes: 2 additions & 1 deletion .devtools/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ echo "==============================="
echo

info "Stopping previously started services, if any."
killall -9 php >/dev/null 2>&1 || true
# shellcheck disable=SC2009
kill -SIGKILL "$(ps aux | grep 'php -S' | grep -v grep | awk '{print $2}')" >/dev/null 2>&1 || true
sleep 1
pass "Services stopped."

Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/scaffold-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,20 @@ jobs:
run: npm ci
working-directory: .scaffold/tests

- name: Install dependencies
run: composer install
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do not do this. The whole point was to hide all the scaffold stuff inside of the .scaffold dir so that the consumers can see a clean structure with just one odd directory .scaffold.

Please revert this back and any other overrides.

The task was to only update a couple of fields in composer.json and store everything in .scaffold.


- name: Run tests
run: kcov --include-pattern=.sh,.bash --bash-parse-files-in-dir=. --exclude-pattern=vendor,node_modules,.scaffold-coverage-html,.scaffold "$(pwd)"/.scaffold-coverage-html .scaffold/tests/node_modules/.bin/bats .scaffold/tests/bats
run: |
kcov --include-pattern=.sh,.bash --bash-parse-files-in-dir=. --exclude-pattern=vendor,node_modules,.scaffold-coverage-html,.scaffold "$(pwd)"/.scaffold-coverage-html .scaffold/tests/node_modules/.bin/bats .scaffold/tests/bats
composer run lint
export XDEBUG_MODE='coverage' && composer run test

- name: Upload coverage report as an artifact
uses: actions/upload-artifact@v4
with:
name: ${{github.job}}-code-coverage-report
path: ./.scaffold-coverage-html
path: ./.scaffold/.coverage-html
if-no-files-found: error

- name: Upload coverage report to Codecov
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ jobs:
php-version: ${{ matrix.php-version }}
extensions: gd, sqlite, pdo_sqlite

- name: Setup composer.json
run: |
rm composer.json
mv composer.dist.json composer.json

- name: Assemble the codebase
run: .devtools/assemble.sh

Expand Down
Loading
Loading