From 8e490af01c446365b7d6e7168d7c2875ac31d5ee Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 25 Mar 2023 10:23:36 +0300 Subject: jenkins lint -> gitea workflow --- .gitea/workflows/lint.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to '.gitea/workflows/lint.yaml') diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml index 1e5b3ad3f..cb3122e39 100644 --- a/.gitea/workflows/lint.yaml +++ b/.gitea/workflows/lint.yaml @@ -17,8 +17,28 @@ jobs: - name: checkout source uses: actions/checkout@v3 + - name: calculate cache key hash + uses: actions/go-hashfiles@v0.0.1 + id: cache-hash + with: + patterns: | + classes/*.php + include/*.php + plugins/**/*.php + - name: phpunit run: php81 ./vendor/bin/phpunit + - uses: https://github.com/actions/cache/restore@v3 + id: cache-phpstan + with: + path: /tmp/phpstan + key: ${{ runner.os }}-phpstan-${{ steps.cache-hash.outputs.hash }} + - name: phpstan run: php81 -d memory_limit=-1 ./vendor/bin/phpstan --memory-limit=2G + + - uses: https://github.com/actions/cache/save@v3 + with: + path: /tmp/phpstan + key: ${{ steps.cache-phpstan.outputs.cache-primary-key }} -- cgit v1.2.3