From 6158b6c24d6c4511c25ec5ba4a174a7b84cb9a54 Mon Sep 17 00:00:00 2001 From: Wildy Sheverando Date: Sun, 3 Nov 2024 01:11:34 +0700 Subject: [PATCH] feat: testing libary using git action --- .github/workflows/test-library.yaml | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/test-library.yaml diff --git a/.github/workflows/test-library.yaml b/.github/workflows/test-library.yaml new file mode 100644 index 0000000..e4567c7 --- /dev/null +++ b/.github/workflows/test-library.yaml @@ -0,0 +1,35 @@ +name: Test Library + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Validate composer.json and composer.lock + run: composer validate --strict + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Test Library + run: php test.php