Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:
BUN_VERSION: "1.3"
GO_VERSION: "1.24"
PYTHON_VERSION: "3.12"
PHP_VERSION: "8.4"
RUBY_VERSION: "3.4"
LUA_VERSION: "5.4"
LUAROCKS_VERSION: "3.12.2"
Expand Down Expand Up @@ -574,6 +575,14 @@ jobs:
with:
ruby-version: ${{ env.RUBY_VERSION }}

- name: "Install PHP and Composer"
if: ${{ contains(format(' {0} ', matrix.languages), ' php ') }}
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ env.PHP_VERSION }}
tools: composer
coverage: none

- name: "Install Bun"
if: ${{ contains(format(' {0} ', matrix.languages), ' bun ') }}
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
Expand Down
1 change: 1 addition & 0 deletions crates/prek/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ pub enum Language {
Lua,
Node,
Perl,
Php,
Pygrep,
Python,
R,
Expand Down
12 changes: 12 additions & 0 deletions crates/prek/src/languages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ mod julia;
mod lua;
mod node;
mod perl;
mod php;
mod pygrep;
mod python;
mod r;
Expand Down Expand Up @@ -80,6 +81,7 @@ pub(crate) enum ShellSupport {
// lua: only system version, support env, support additional deps
// node: install requested version, support env, support additional deps (delegated to nodeenv)
// perl: only system version, support env, support additional deps
// php: only system version, support env, support additional deps
// pygrep: only system version, no env, no additional deps
// python: install requested version, support env, support additional deps (delegated to virtualenv)
// r: only system version, support env, support additional deps
Expand All @@ -105,6 +107,7 @@ impl Language {
| Self::Lua
| Self::Node
| Self::Perl
| Self::Php
| Self::Pygrep
| Self::Python
| Self::R
Expand All @@ -127,6 +130,7 @@ impl Language {
| Self::Lua
| Self::Node
| Self::Perl
| Self::Php
| Self::Python
| Self::Ruby
| Self::Script
Expand Down Expand Up @@ -169,6 +173,7 @@ impl Language {
| Self::Julia
| Self::Lua
| Self::Perl
| Self::Php
| Self::R
| Self::Script
| Self::Swift
Expand All @@ -195,6 +200,7 @@ impl Language {
| Self::Julia
| Self::Lua
| Self::Perl
| Self::Php
| Self::R
| Self::Ruby
| Self::Script
Expand Down Expand Up @@ -226,6 +232,7 @@ impl Language {
| Self::Julia
| Self::Lua
| Self::Perl
| Self::Php
| Self::Pygrep
| Self::R
| Self::Script
Expand All @@ -252,6 +259,7 @@ impl Language {
| Self::Lua
| Self::Node
| Self::Perl
| Self::Php
| Self::Python
| Self::R
| Self::Ruby
Expand Down Expand Up @@ -291,6 +299,7 @@ impl Language {
Self::Lua => lua::Lua.install(hook, store, reporter).await,
Self::Node => node::Node.install(hook, store, reporter).await,
Self::Perl => perl::Perl.install(hook, store, reporter).await,
Self::Php => php::Php.install(hook, store, reporter).await,
Self::Pygrep => pygrep::Pygrep.install(hook, store, reporter).await,
Self::Python => python::Python.install(hook, store, reporter).await,
Self::R => r::R.install(hook, store, reporter).await,
Expand Down Expand Up @@ -319,6 +328,7 @@ impl Language {
Self::Lua => lua::Lua.check_health(info).await,
Self::Node => node::Node.check_health(info).await,
Self::Perl => perl::Perl.check_health(info).await,
Self::Php => php::Php.check_health(info).await,
Self::Pygrep => pygrep::Pygrep.check_health(info).await,
Self::Python => python::Python.check_health(info).await,
Self::R => r::R.check_health(info).await,
Expand Down Expand Up @@ -384,6 +394,7 @@ impl Language {
Self::Lua => lua::Lua.run(hook, filenames, store, reporter).await,
Self::Node => node::Node.run(hook, filenames, store, reporter).await,
Self::Perl => perl::Perl.run(hook, filenames, store, reporter).await,
Self::Php => php::Php.run(hook, filenames, store, reporter).await,
Self::Pygrep => pygrep::Pygrep.run(hook, filenames, store, reporter).await,
Self::Python => python::Python.run(hook, filenames, store, reporter).await,
Self::R => r::R.run(hook, filenames, store, reporter).await,
Expand Down Expand Up @@ -416,6 +427,7 @@ pub(crate) async fn extract_metadata(hook: &mut Hook) -> Result<()> {
| Language::Lua
| Language::Node
| Language::Perl
| Language::Php
| Language::Pygrep
| Language::R
| Language::Ruby
Expand Down
Loading
Loading