Closed Treggats closed 2 months ago
@aidan-casey is there a reason that 99% of the Quality Github Action workflows are the same?
By applying the following patch they could be merged into one.
@brendt how do you feel about adding rector as a job to keep it up to date?
@Treggats they originally started as a single job, but as we considered things we might be looking to add in the future (automatic comments to PRs, etc.) it felt cleaner to split off.
@Treggats does Rector have a CI mode like CS fixer? One of the decisions we made there was that those CI tools would not automatically write back to the repo on PRs, but would fail so people can run and commit them locally. We'd need to be able to maintain that approach, I think.
@aidan-casey
@Treggats does Rector have a CI mode like CS fixer?
I'm guessing you mean running but not changing anything. It does. (--dry-run
)
# the X at the end indicates an error exit code
#
~/P❯❯❯ vendor/bin/rector process --no-ansi --dry-run --no-diffs --no-progress-bar ✘ 1
[OK] 1 file would have been changed (dry-run) by Rector
About writing back you'd need a separate action for that. Like the fixer has.
but would fail so people can run and commit them locally.
I have the same approach on my work application, though we use Laravel Pint there, which will fail if it find anything
@aidan-casey
@Treggats they originally started as a single job, but as we considered things we might be looking to add in the future (automatic comments to PRs, etc.) it felt cleaner to split off.
On the subject of splitting of, if we need to have recurring action/jobs/etc. it's possible to create our own custum action and reference that.
Small example
- name: Deploy to staging
uses: ./.github/actions/vapor-deploy
with:
composer_auth: ${{ secrets.COMPOSER_AUTH }
On the subject of splitting of, if we need to have recurring action/jobs/etc. it's possible to create our own custum action and reference that.
Sure, but now you're still talking a minimum of two (if not three) separate actions. If we end up with three workflows that need the same functionality, it may make sense to refactor that, but I'm not seeing the need today.
, it may make sense to refactor that, but I'm not seeing the need today.
Same, I just mentioned it as a possibility for in the future :)
I've made it so that MySQL tests work. We still need to update the github action, but I don't know how.
I'm gonna skip on adding pgsql support for now, see #354
I'll update the GitHub action when I get back
@brendt I've updated #322 to include MySQL in the CI (also Postgres, but could remove that again if needed) All tests passed
With the PR being merged, this issue can be closed. The issue with Postgress is going to be addressed with #364
Since we now support multiple databases, our CI should reflect that.
feature let github actions run with the following databases
todo
composer qa
script, before running the fixerProposal to support multiple database dialects
database.php
to an initalizerdatabaseDialect
which reads its value from the env, and defaults to SQLite