-
Notifications
You must be signed in to change notification settings - Fork 853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add justfile, remove coveralls, and fix AUTOLOAD in CI #1801
base: master
Are you sure you want to change the base?
Conversation
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
php-version: "8.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're not running phpstan
across multiple PHP versions, I just hardcoded the value we're using
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
env: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this never worked as intended: env
doesn't actually set the environment, it just sets a github variable called env
env: | ||
- AUTOLOAD=0 | ||
- AUTOLOAD=1 | ||
autoload: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because just
recipes can take arguments, we can replace the env-looking value with the actual value we want and pass it in directly
@@ -92,15 +86,16 @@ jobs: | |||
- "8.0" | |||
- "8.1" | |||
- "8.2" | |||
name: Tests (php@${{ matrix.php-version }}, AUTOLOAD=${{ matrix.autoload }}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will show a nicer name now that we're not using the full AUTOLOAD
string
Because the names of the CI jobs changed, there's a mismatch on the required tests. We'll have to bypass some branch protections in PHP during the cutover, but should be smooth sailing after that. |
Why?
In an effort to modernize and simplify our local tooling, we're moving our dev commands from makefiles to justfiles. This is intended to be mostly a drop-in replacement, but some command names may change per standardization efforts.
Namely, I renamed
fmt
toformat
, addedlint
in place ofphpstan
, and swappedvendor
toinstall
.One actual change is that dependencies won't auto-install before running tests like they did before. Users will have to
just install
beforejust test
.Also, I didn't add a ton of docstrings, since the recipes are mostly self explanatory. But, we could add some. The recipes are also grouped, so the help output looks like:
Without groups, output of
just
is:Which isn't bad either. I could go either way on the groups. If nothing else, I think it makes the
justfile
itself harder to grok, so i'm fine to pull them too.CI
Also, there was an issue where we weren't correctly setting the
AUTOLOAD
env var, so we were never running tests withautoload=1
. The justfile flagged this issue and I changed the way the matrix was loaded to acommodate it.What?
justfile
just
instead ofmake
See Also