Skip to content

Commit 09215f7

Browse files
authored
Remove features fpm for php-test. (#123)
1 parent 85baac0 commit 09215f7

File tree

6 files changed

+4
-110
lines changed

6 files changed

+4
-110
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ jobs:
2929
name: Required
3030
needs:
3131
- ci
32-
- check
3332
runs-on: ubuntu-20.04
3433
steps:
3534
- name: Check results
3635
run: |
3736
[[ ${{ needs.ci.result }} == 'success' ]] || exit 1;
38-
[[ ${{ needs.check.result }} == 'success' ]] || exit 1;
3937
4038
ci:
4139
name: CI
@@ -147,96 +145,3 @@ jobs:
147145
toolchain: nightly
148146
command: doc
149147
args: --workspace --no-deps --all-features
150-
151-
# Test every features for single crate.
152-
check:
153-
name: Check
154-
strategy:
155-
fail-fast: false
156-
matrix:
157-
os:
158-
- ubuntu-20.04
159-
php-version:
160-
- "7.4"
161-
features:
162-
- ""
163-
- "--all-features"
164-
165-
runs-on: ${{ matrix.os }}
166-
steps:
167-
- name: Checkout
168-
uses: actions/checkout@v2
169-
170-
- name: Install libclang
171-
run: sudo apt-get install -y llvm-10-dev libclang-10-dev
172-
173-
- name: Setup PHP
174-
uses: shivammathur/setup-php@v2
175-
with:
176-
php-version: ${{ matrix.php-version }}
177-
tools: php-config
178-
179-
- name: Install Rust Stable
180-
uses: actions-rs/toolchain@v1
181-
with:
182-
toolchain: stable
183-
override: true
184-
185-
- name: Cargo generate lockfile
186-
uses: actions-rs/cargo@v1
187-
with:
188-
toolchain: stable
189-
command: generate-lockfile
190-
191-
- name: Setup cargo cache
192-
uses: actions/cache@v3
193-
with:
194-
path: |
195-
~/.cargo/bin/
196-
~/.cargo/registry/index/
197-
~/.cargo/registry/cache/
198-
~/.cargo/git/db/
199-
target/
200-
key: ${{ matrix.os }}-check-${{ matrix.php-version }}-${{ matrix.features }}-${{ hashFiles('**/Cargo.lock') }}
201-
202-
- name: Cargo check phper-sys
203-
uses: actions-rs/cargo@v1
204-
with:
205-
command: check
206-
args: --manifest-path phper-sys/Cargo.toml ${{ matrix.features }}
207-
208-
- name: Cargo check phper-build
209-
uses: actions-rs/cargo@v1
210-
with:
211-
command: check
212-
args: --manifest-path phper-build/Cargo.toml ${{ matrix.features }}
213-
214-
- name: Cargo check phper-macros
215-
uses: actions-rs/cargo@v1
216-
with:
217-
command: check
218-
args: --manifest-path phper-macros/Cargo.toml ${{ matrix.features }}
219-
220-
- name: Cargo check phper-alloc
221-
uses: actions-rs/cargo@v1
222-
with:
223-
command: check
224-
args: --manifest-path phper-alloc/Cargo.toml ${{ matrix.features }}
225-
226-
- name: Cargo check phper-test
227-
uses: actions-rs/cargo@v1
228-
with:
229-
command: check
230-
args: --manifest-path phper-test/Cargo.toml ${{ matrix.features }}
231-
232-
- name: Cargo check phper
233-
uses: actions-rs/cargo@v1
234-
with:
235-
command: check
236-
args: --manifest-path phper/Cargo.toml ${{ matrix.features }}
237-
238-
- name: Cargo check phper-doc
239-
uses: actions-rs/cargo@v1
240-
with:
241-
command: check
242-
args: --manifest-path phper-doc/Cargo.toml ${{ matrix.features }}

phper-test/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,13 @@ rust-version = { workspace = true }
1919
repository = { workspace = true }
2020
license = { workspace = true }
2121

22-
[features]
23-
fpm = ["fastcgi-client", "tokio/full"]
24-
2522
[dependencies]
26-
fastcgi-client = { version = "0.8.0", optional = true }
23+
fastcgi-client = "0.8.0"
2724
libc = "0.2.137"
2825
once_cell = "1.16.0"
2926
phper-macros = { version = "0.11.0", path = "../phper-macros" }
3027
tempfile = "3.3.0"
31-
tokio = { version = "1.22.0", optional = true }
28+
tokio = { version = "1.22.0", features = ["full"] }
3229

3330
[package.metadata.docs.rs]
3431
rustdoc-args = ["--cfg", "docsrs"]

phper-test/src/context.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,14 @@
1010

1111
use crate::utils;
1212
use once_cell::sync::OnceCell;
13-
#[cfg(feature = "fpm")]
14-
use std::io::Write;
1513
use std::{
1614
env,
1715
fs::read_to_string,
16+
io::Write,
1817
ops::{Deref, DerefMut},
1918
path::Path,
2019
process::Command,
2120
};
22-
#[cfg(feature = "fpm")]
2321
use tempfile::NamedTempFile;
2422

2523
pub struct Context {
@@ -83,7 +81,6 @@ impl Context {
8381
ContextCommand { cmd, args }
8482
}
8583

86-
#[cfg(feature = "fpm")]
8784
#[cfg_attr(docsrs, doc(cfg(feature = "fpm")))]
8885
pub fn find_php_fpm(&self) -> Option<String> {
8986
use std::ffi::OsStr;
@@ -113,8 +110,6 @@ impl Context {
113110
})
114111
}
115112

116-
#[cfg(feature = "fpm")]
117-
#[cfg_attr(docsrs, doc(cfg(feature = "fpm")))]
118113
pub fn create_tmp_fpm_conf_file(&self) -> NamedTempFile {
119114
let mut tmp = NamedTempFile::new().unwrap();
120115
let file = tmp.as_file_mut();

phper-test/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@
1515

1616
pub mod cli;
1717
mod context;
18-
#[cfg(feature = "fpm")]
19-
#[cfg_attr(docsrs, doc(cfg(feature = "fpm")))]
2018
pub mod fpm;
2119
pub mod utils;

phper-test/src/utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ pub(crate) fn execute_command<S: AsRef<OsStr> + Debug>(argv: &[S]) -> String {
2727
String::from_utf8(output).unwrap().trim().to_owned()
2828
}
2929

30-
#[cfg(feature = "fpm")]
3130
pub(crate) fn spawn_command<S: AsRef<OsStr> + Debug>(
3231
argv: &[S], wait_time: Option<std::time::Duration>,
3332
) -> std::process::Child {

tests/integration/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ indexmap = "1.9.2"
2525
phper = { version = "0.11.0", path = "../../phper" }
2626

2727
[dev-dependencies]
28-
phper-test = { version = "0.11.0", path = "../../phper-test", features = ["fpm"] }
28+
phper-test = { version = "0.11.0", path = "../../phper-test" }

0 commit comments

Comments
 (0)