@@ -97,24 +97,25 @@ jobs:
9797 php --version
9898 mysql --version
9999 composer install --dev --no-interaction --verbose
100+ composer global require laravel/pint
100101 composer dump-autoload
101102 cp .github/scripts/env.test .env
102103 cp .github/scripts/phpunit.xml phpunit.xml
103104 .github/scripts/version.sh
104105 php artisan database:create --reset
105106 php artisan migrate:refresh --seed
106107
107- - name : Get version
108- run : .github/scripts/version.sh
108+ - name : Run Pint
109+ run : pint --test
109110
110111 - name : Run Tests
111112 run : |
112113 export PHP_CS_FIXER_IGNORE_ENV=1
113114 vendor/bin/pest --parallel --ci
114115
115- - name : Run Rector
116- run : |
117- vendor/bin/rector --dry-run
116+ # - name: Run Rector
117+ # run: |
118+ # vendor/bin/rector --dry-run
118119
119120 # This runs after all of the tests, run have run. Creates a cleaned up version of the
120121 # distro, and then creates the artifact to push up to S3 or wherever
@@ -214,13 +215,33 @@ jobs:
214215 id-token : write
215216 runs-on : ubuntu-latest
216217 needs : [build]
217- if : github.repository == 'phpvms/phpvms' && github.event_name != 'pull_request' && (github.ref == 'refs/heads/dev ')
218+ if : github.repository == 'phpvms/phpvms' && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main ')
218219 steps :
219220 - name : Checkout
220221 uses : actions/checkout@v4
221222 with :
222223 fetch-depth : 0
223224
225+ # Configure Caching
226+ - name : Get composer cache directory
227+ id : composer-cache
228+ run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
229+
230+ - name : Cache dependencies
231+ uses : actions/cache@v4
232+ with :
233+ path : ${{ steps.composer-cache.outputs.dir }}
234+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
235+ restore-keys : ${{ runner.os }}-composer-
236+
237+ # Dependencies
238+ - name : ' Install Release Dependencies'
239+ run : |
240+ rm -rf vendor
241+ composer install --no-dev --prefer-dist --no-interaction --verbose
242+ composer dump-autoload
243+ sudo chmod +x ./.github/scripts/*
244+
224245 # https://github.com/marketplace/actions/nerdbank-gitversioning
225246 - name : Nerdbank.GitVersioning
226247 uses : dotnet/nbgv@v0.4.2
@@ -244,9 +265,9 @@ jobs:
244265 with :
245266 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
246267 tags : |
247- type=edge,branch=dev
268+ type=semver,pattern={{version}},value=${{ env.NBGV_SemVer2 }}
269+ type=semver,pattern={{version}},value=${{ env.NBGV_MajorMinorVersion }}
248270 type=ref,event=branch
249- # type=sha,enable=false
250271
251272 - name : Build and push
252273 id : push
0 commit comments