diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9e0d5b3..ade1744f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,13 +49,26 @@ jobs: coverage: none - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: Cache module compilation + uses: actions/cache@v3 + with: + path: /tmp/varnish-modules-${{ matrix.varnish-modules-version }} + key: varnish-modules-${{ matrix.varnish-modules-version }} - name: Setup Varnish and Nginx run: | sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish.sh sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh + - name: Cache Vendor + id: cache-vendor + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-vendor + - name: Install composer dependencies env: SYMFONY_REQUIRE: ${{ matrix.symfony-version }} @@ -88,13 +101,26 @@ jobs: coverage: none - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: Cache module compilation + uses: actions/cache@v3 + with: + path: /tmp/varnish-modules-${{ matrix.varnish-modules-version }} + key: varnish-modules-${{ matrix.varnish-modules-version }} - name: Setup Varnish and Nginx run: | sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish-legacy.sh sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh + - name: Cache Vendor + id: cache-vendor + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-vendor + - name: Install composer dependencies # Lowest discovery can end up with an incompatible psr7 implementation, see discussion in https://github.com/FriendsOfSymfony/FOSHttpCache/pull/567 run: | @@ -126,13 +152,20 @@ jobs: coverage: none - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Varnish and Nginx run: | sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish-legacy.sh sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh + - name: Cache Vendor + id: cache-vendor + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-vendor + - name: Install composer dependencies run: | composer require --no-update --no-interaction "guzzlehttp/psr7:2.*" @@ -163,13 +196,20 @@ jobs: coverage: none - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Varnish and Nginx run: | sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish-legacy.sh sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh + - name: Cache Vendor + id: cache-vendor + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-vendor-lowest + - name: Install composer dependencies run: | composer require --no-update --no-interaction "guzzlehttp/psr7:2.*" @@ -194,13 +234,26 @@ jobs: coverage: xdebug - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: Cache module compilation + uses: actions/cache@v3 + with: + path: /tmp/varnish-modules-${{ matrix.varnish-modules-version }} + key: varnish-modules-${{ matrix.varnish-modules-version }} - name: Setup Varnish and Nginx run: | sh ${GITHUB_WORKSPACE}/.github/workflows/setup-varnish.sh sh ${GITHUB_WORKSPACE}/.github/workflows/setup-nginx.sh + - name: Cache Vendor + id: cache-vendor + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-vendor + - name: Install dependencies run: | composer require "friends-of-phpspec/phpspec-code-coverage:^6.3.0" --no-interaction --no-update diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 7cbca592..91266ca5 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -18,6 +18,13 @@ jobs: - name: Pull in optional dependencies run: composer require --no-update phpunit/phpunit toflar/psr6-symfony-http-cache-store:^4.2 + - name: Cache Vendor + id: cache-vendor + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-vendor + - name: PHPStan uses: docker://oskarstark/phpstan-ga with: @@ -36,6 +43,13 @@ jobs: - name: Pull in optional dependencies run: composer require --no-update phpunit/phpunit toflar/psr6-symfony-http-cache-store:^4.2 + - name: Cache Vendor + id: cache-vendor + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-vendor + - name: PHPStan uses: docker://oskarstark/phpstan-ga with: