Skip to content

Commit

Permalink
Merge pull request #58 from silinternational/develop
Browse files Browse the repository at this point in the history
dependency updates and cleanup
  • Loading branch information
briskt authored Jul 10, 2024
2 parents 675694a + 51a3d53 commit 506a223
Show file tree
Hide file tree
Showing 8 changed files with 1,144 additions and 459 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Run unit tests
run: docker-compose -f actions-services.yml run --rm app ./run-tests.sh
run: docker compose -f actions-services.yml run --rm app ./run-tests.sh
- name: Run API tests
run: docker-compose -f actions-services.yml run --rm app ./run-tests-api.sh
run: docker compose -f actions-services.yml run --rm app ./run-tests-api.sh
- name: Check PSR2
run: docker-compose -f actions-services.yml run --rm app ./check-psr2.sh
run: docker compose -f actions-services.yml run --rm app ./check-psr2.sh

build-and-publish:
name: Build and Publish
Expand Down
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
start: deps db tables basemodels app

app: db
docker-compose up -d app cron phpmyadmin
docker compose up -d app cron phpmyadmin

deps:
docker-compose run --rm cli composer install
docker compose run --rm cli composer install

depsupdate:
docker-compose run --rm cli bash -c "composer update && composer show -D > versions.txt"
docker compose run --rm cli bash -c "composer update && composer show -D > versions.txt"

db:
docker-compose up -d db
docker compose up -d db

tables: db
docker-compose run --rm cli whenavail db 3306 100 ./yii migrate --interactive=0
docker compose run --rm cli whenavail db 3306 100 ./yii migrate --interactive=0

basemodels: tables
docker-compose run --rm cli whenavail db 3306 100 ./rebuildbasemodels.sh
docker compose run --rm cli whenavail db 3306 100 ./rebuildbasemodels.sh

test: app
make testunit
make testapi

testunit:
APP_ENV=test docker-compose run --rm app /data/run-tests.sh
APP_ENV=test docker compose run --rm app /data/run-tests.sh

#TODO: tests api won't run unless the access keys are abc-123, need to change that so test will run out-of-box.
# would be best to have an additional container for testing because I don't think the env vars are being honored on the command line the way we think they are.
testapi:
APP_ENV=test docker-compose run --rm app /data/run-tests-api.sh
APP_ENV=test docker compose run --rm app /data/run-tests-api.sh

cron: db
docker-compose run --rm cron ./yii send/send-queued-email
docker compose run --rm cron ./yii send/send-queued-email

clean:
docker-compose kill
docker-compose rm -f
docker compose kill
docker compose rm -f

psr2:
docker-compose run --rm cli bash -c "vendor/bin/php-cs-fixer fix ."
docker compose run --rm cli bash -c "vendor/bin/php-cs-fixer fix ."
98 changes: 0 additions & 98 deletions Vagrantfile

This file was deleted.

1 change: 0 additions & 1 deletion actions-services.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '2'
services:
db:
image: mariadb:10
Expand Down
Loading

0 comments on commit 506a223

Please sign in to comment.