From 0c1a3390631c076b844c69b434fba1f4d057fd6b Mon Sep 17 00:00:00 2001 From: Armel van Ravels Date: Fri, 30 Aug 2024 22:39:46 +0200 Subject: [PATCH] Add startup instructions --- .env.example | 1 + .gitea/workflows/ci.yml | 13 ++++++++++++- Makefile | 4 ++++ README.md | 18 ++++++++++++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..0703741 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +ENVIRONMENT=development diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5709218..6788571 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -23,12 +23,23 @@ jobs: - name: Validate composer.json run: composer validate + - uses: actions/setup-go@v3 + with: + go-version: '1.20' + + - uses: actions/go-hashfiles@v0.0.1 + id: get-hash + with: + patterns: |- + go.sum + **/composer.json + - name: Cache Composer packages id: composer-cache uses: actions/cache@v4 with: path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }} + key: ${{ runner.os }}-php-${{ steps.get-hash.outputs.hash }} restore-keys: | ${{ runner.os }}-php- diff --git a/Makefile b/Makefile index 4664082..b142425 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ up: start: up composer-install +composer-install: + "$(EXEC)" composer install stop: docker compose stop cmd: @@ -13,3 +15,5 @@ phpstan: "$(EXEC)" vendor/bin/phpstan analyse src --level 8 cs-fix: "$(EXEC)" vendor/bin/php-cs-fixer fix --allow-risky=yes +test: + "$(EXEC)" vendor/bin/pest \ No newline at end of file diff --git a/README.md b/README.md index e69de29..b7d6e92 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,18 @@ +# Armel.net + +### How to run + +``` +cp .env.example .env +make start +``` + +### How to stop +``` +make stop +``` + +### How to test +``` +make test +```