From a79fd519ed5ec49955d9b12ed4a2b36ee03e9c3d Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Wed, 22 May 2024 18:02:01 +0900 Subject: [PATCH] Gitbub action cache --- .github/workflows/ci.yml | 13 +++++++++++++ phpstan.neon | 2 +- tmp/.gitignore | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 tmp/.gitignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 814a1b8..d65bb88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,23 @@ jobs: - uses: php-actions/composer@v6 env: COMPOSER_ROOT_VERSION: dev-master + - name: "Restore result cache" + uses: actions/cache/restore@v4 + with: + path: ./tmp + key: "result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}" + restore-keys: | + result-cache-v1-${{ matrix.php-version }}- - name: PHPStan Static Analysis uses: php-actions/phpstan@v3 with: path: src/ + - name: "Save result cache" + uses: actions/cache/save@v4 + if: always() + with: + path: ./tmp + key: "result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}" # We need to use phpunit from the self install to get the class paths - name: PHPunit Tests Prepare env: diff --git a/phpstan.neon b/phpstan.neon index b7ff8aa..a1ca077 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,7 +1,7 @@ # PHP Stan Config parameters: - tmpDir: /tmp/phpstan-codeblocks-amazon-incentives + tmpDir: %currentWorkingDirectory%/tmp/phpstan-codeblocks-amazon-incentives level: 8 paths: - %currentWorkingDirectory%/src diff --git a/tmp/.gitignore b/tmp/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/tmp/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore