Skip to content

Commit

Permalink
Removed caching from Symfony quickstart jobs.
Browse files Browse the repository at this point in the history
Caching causes the project directory to be non-empty on cache restore,
which causes the create-project command to fail.

Changed regular quickstart job to use custom (clean) working directory.
Removed matrix strategy from regular quickstart job.
  • Loading branch information
Bilge committed Dec 2, 2022
1 parent b00d715 commit 4cd4dbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/Quickstart Symfony.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ jobs:
run: mkdir --verbose "$GITHUB_WORKFLOW"
working-directory:

- name: Cache dependencies
id: composer-cache
uses: actions/cache@v3
with:
path: ${{ github.workflow }}/vendor
key: php-quickstart-symfony-${{ env.php }}

- name: Create Symfony project
run: composer create-project symfony/skeleton . ^5

Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/Quickstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,28 @@ on:
schedule:
- cron: 0 6 * * *

defaults:
run:
working-directory: Quickstart

jobs:
Quickstart:
runs-on: ubuntu-latest

strategy:
matrix:
php:
- 8.1
env:
php: 8.1

steps:
- uses: actions/checkout@v3

- name: Setup PHP ${{ matrix.php }}
- name: Setup PHP ${{ env.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: ${{ env.php }}

- name: Cache dependencies
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: php-quickstart-${{ matrix.php }}
- name: Create working directory
run: mkdir --verbose "$GITHUB_WORKFLOW"
working-directory:

- name: Initialize Composer project
run: composer init --name foo/bar
Expand Down

0 comments on commit 4cd4dbd

Please sign in to comment.