Skip to content

Commit

Permalink
Merge abc8ad7 into 0bbb382
Browse files Browse the repository at this point in the history
  • Loading branch information
ngmy committed May 11, 2021
2 parents 0bbb382 + abc8ad7 commit 61c5a18
Show file tree
Hide file tree
Showing 36 changed files with 1,082 additions and 699 deletions.
5 changes: 4 additions & 1 deletion .envrc.dist
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export PATH=$PWD/laradockctl/bin:$PATH
export LARADOCKCTL_COMMAND_PATH=$PWD/.laradock/commands:$PWD/laradockctl/src/commands
export LARADOCKCTL_ADDITIONAL_COMMAND_DIRS=$PWD/.laradock/commands
export LARADOCKCTL_CONTAINER_NAMES=mysql,workspace
export LARADOCKCTL_ENV_FILE=$PWD/.laradock/env-development
export LARADOCKCTL_PHIVE_HOME_DIR_CONTAINER=.laradock/data/phive
37 changes: 13 additions & 24 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,18 @@ on: [push, pull_request]
jobs:
install_tools:

runs-on: ubuntu-latest
runs-on: ubuntu-18.04

name: Install tools

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Install PHIVE
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: |
wget -O phive.phar https://phar.io/releases/phive.phar
wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc
gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79
gpg --verify phive.phar.asc phive.phar
- name: Install tools
uses: nick-invision/retry@v2
uses: ngmy/phive-install-action@master
with:
timeout_minutes: 10
max_attempts: 3
command: |
php phive.phar --no-progress install \
--copy \
--trust-gpg-keys E82B2FB314E9906E,31C7E470E2138192,CF1A108D0E7AE720,4AA394086372C20A
phive-arguments: --force-accept-unsigned

- name: Upload tools to artifact store
uses: actions/upload-artifact@master
Expand All @@ -44,7 +28,7 @@ jobs:

needs: install_tools

runs-on: ubuntu-latest
runs-on: ubuntu-18.04

services:
mysql:
Expand Down Expand Up @@ -81,7 +65,7 @@ jobs:
run: sudo update-alternatives --set php /usr/bin/php${{ matrix.php }}

- name: Update Composer to latest version
run: composer self-update
run: sudo composer self-update

- name: Specify composer.json to use
run: |
Expand Down Expand Up @@ -126,15 +110,20 @@ jobs:
name: tools
path: tools

- name: Set tools as an executable
run: find tools -type f -print0 | xargs -0 chmod +x

- name: Change MySQL authentication method
run: mysql -h 127.0.0.1 -u root -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY ''"

- name: Run lint
env:
PSALM_SHEPHERD: 1
# TODO: Remove it when psalm no longer tries to create a cache directory
# https://github.com/vimeo/psalm/issues/4267
XDG_CACHE_HOME: /tmp
run: composer lint

- name: Run bug analysis
run: composer findbugs

- name: Run unit tests
env:
DB_HOST: '127.0.0.1'
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
/.laradock/data/*
!/.laradock/data/.gitkeep
/.phpdoc
/build/
/tools/
/tools-src/
/vendor/
.envrc.local
.php_cs
.php_cs.cache
.phpunit.result.cache
phpcs.xml
phpdoc.xml
phpstan.neon
phpunit.xml
psalm.xml
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[submodule "laradock"]
path = laradock
url = https://github.com/Laradock/laradock.git
ignore = dirty
[submodule "laradockctl"]
path = laradockctl
url = https://github.com/ngmy/laradockctl.git
14 changes: 0 additions & 14 deletions .laradock/commands/my/destroy.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .laradock/commands/my/down.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .laradock/commands/my/phive.sh

This file was deleted.

25 changes: 0 additions & 25 deletions .laradock/commands/my/up.sh

This file was deleted.

19 changes: 19 additions & 0 deletions .laradock/commands/up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
#
# The laradockctl command to start up a development environment.

set -Ceuo pipefail

local NAME='up'
local DESCRIPTION='Start up a development environment'

handle() {
source "$(laradockctl_command_path up.sh)"
handle

# Set environment variables to configure the testing environment
sed -i 's/name="DB_HOST" value=""/name="DB_HOST" value="mysql"/g' ../phpunit.xml
sed -i 's/name="DB_DATABASE" value=""/name="DB_DATABASE" value="test"/g' ../phpunit.xml
sed -i 's/name="DB_USERNAME" value=""/name="DB_USERNAME" value="root"/g' ../phpunit.xml
sed -i 's/name="DB_PASSWORD" value=""/name="DB_PASSWORD" value="root"/g' ../phpunit.xml
}
Loading

0 comments on commit 61c5a18

Please sign in to comment.