From 13f90acbf35e835d7ab1f97421ad717b6fd08613 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Mon, 27 May 2024 01:41:10 +0200 Subject: [PATCH] ci: add basic testing --- .github/workflows/general.yml | 20 +++++++++++++++++++- hack/generate-client.sh | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/general.yml b/.github/workflows/general.yml index 89985ae..4a4ea25 100644 --- a/.github/workflows/general.yml +++ b/.github/workflows/general.yml @@ -16,6 +16,24 @@ jobs: steps: - name: Checkout source id: source - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 + uses: actions/checkout@v4 + + - name: Setup php + id: php + uses: shivammathur/setup-php@v2 + with: + php-version: "7.4" + + - name: Install generator + run: | + npm install @openapitools/openapi-generator-cli -g + + - name: Run install + id: deps + run: composer install + + - name: Run test + id: test + run: vendor/bin/phpunit ... diff --git a/hack/generate-client.sh b/hack/generate-client.sh index 82b0be0..9b2c508 100755 --- a/hack/generate-client.sh +++ b/hack/generate-client.sh @@ -12,7 +12,7 @@ SPEC_VERSION="1.0.0-alpha1" SPEC_DOWNLOAD=${SPEC:-https://dl.gopad.eu/openapi/${SPEC_VERSION}.yml} echo "> deleteing apis and models" -rm -rf lib test +rm -rf lib if hash openapi-generator-cli 2>/dev/null; then openapi-generator-cli \