style: cargo fmt
Check and Lint / Check (pull_request) Successful in 18s
Check and Lint / Rustfmt (pull_request) Successful in 19s
Check and Lint / Clippy (pull_request) Successful in 19s
Test and Coverage / Test (pull_request) Successful in 19s
Check and Lint / Build RPM (pull_request) Canceled after 26s
Check and Lint / Check (push) Successful in 22s
Check and Lint / Rustfmt (push) Successful in 25s
Check and Lint / Clippy (push) Successful in 20s
Check and Lint / Build RPM (push) Failing after 1m50s
Test and Coverage / Coverage (pull_request) Canceled after 2m9s
Test and Coverage / Test (push) Successful in 24s
Release / Build and push RPM (push) Failing after 1m49s
Test and Coverage / Coverage (push) Successful in 2m36s
Check and Lint / Check (pull_request) Successful in 18s
Check and Lint / Rustfmt (pull_request) Successful in 19s
Check and Lint / Clippy (pull_request) Successful in 19s
Test and Coverage / Test (pull_request) Successful in 19s
Check and Lint / Build RPM (pull_request) Canceled after 26s
Check and Lint / Check (push) Successful in 22s
Check and Lint / Rustfmt (push) Successful in 25s
Check and Lint / Clippy (push) Successful in 20s
Check and Lint / Build RPM (push) Failing after 1m50s
Test and Coverage / Coverage (pull_request) Canceled after 2m9s
Test and Coverage / Test (push) Successful in 24s
Release / Build and push RPM (push) Failing after 1m49s
Test and Coverage / Coverage (push) Successful in 2m36s
This commit was merged in pull request #2.
This commit is contained in:
@@ -6,6 +6,10 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Check
|
||||
|
||||
@@ -8,6 +8,10 @@ on:
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-rpm:
|
||||
name: Build and push RPM
|
||||
@@ -33,7 +37,7 @@ jobs:
|
||||
run: |
|
||||
for pkg in target/generate-rpm/*.rpm; do
|
||||
curl -f -X PUT \
|
||||
--user "${{ secrets.GITEA_REGISTRY_TOKEN }}" \
|
||||
--user "${{ secrets.GITEA_TOKEN }}" \
|
||||
--upload-file "$pkg" \
|
||||
"https://gitea.psi.ch/api/packages/${{ github.repository_owner }}/rpm/upload"
|
||||
done
|
||||
|
||||
@@ -2,6 +2,10 @@ name: Test and Coverage
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
@@ -20,7 +24,9 @@ jobs:
|
||||
- uses: https://github.com/dtolnay/rust-toolchain@stable
|
||||
- uses: https://github.com/Swatinem/rust-cache@v2
|
||||
- name: Install cargo-tarpaulin
|
||||
run: cargo install cargo-tarpaulin
|
||||
run: |
|
||||
cargo install cargo-binstall
|
||||
cargo binstall cargo-tarpaulin
|
||||
- name: Generate code coverage
|
||||
run: cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
|
||||
- uses: https://github.com/actions/upload-artifact@v3
|
||||
|
||||
+10
-4
@@ -81,8 +81,8 @@ impl RawLauncherEntry {
|
||||
/// Parse a `defaults.json` document into a resolved [`Config`].
|
||||
pub fn load_config(json: &str) -> Result<Config> {
|
||||
let deserializer = &mut serde_json::Deserializer::from_str(json);
|
||||
let raw: RawConfig = serde_path_to_error::deserialize(deserializer)
|
||||
.context("failed to parse config JSON")?;
|
||||
let raw: RawConfig =
|
||||
serde_path_to_error::deserialize(deserializer).context("failed to parse config JSON")?;
|
||||
|
||||
let entries = raw
|
||||
.map
|
||||
@@ -134,7 +134,10 @@ mod tests {
|
||||
|
||||
let entry = &config.entries["x10sa"];
|
||||
assert_eq!(entry.python, PathBuf::from("/venvs/pxii/bin/python"));
|
||||
assert_eq!(entry.gui_file, PathBuf::from("/apps/aaredaq-pxii/custom/gui.py"));
|
||||
assert_eq!(
|
||||
entry.gui_file,
|
||||
PathBuf::from("/apps/aaredaq-pxii/custom/gui.py")
|
||||
);
|
||||
assert_eq!(
|
||||
entry.server_file,
|
||||
PathBuf::from("/apps/aaredaq-pxii/custom/server.py")
|
||||
@@ -147,7 +150,10 @@ mod tests {
|
||||
|
||||
let entry = &config.entries["x06da"];
|
||||
assert_eq!(entry.python, PathBuf::from("/venvs/pxiii/bin/python"));
|
||||
assert_eq!(entry.gui_file, PathBuf::from("/apps/aaredaq-pxiii/src/gui.py"));
|
||||
assert_eq!(
|
||||
entry.gui_file,
|
||||
PathBuf::from("/apps/aaredaq-pxiii/src/gui.py")
|
||||
);
|
||||
assert_eq!(
|
||||
entry.server_file,
|
||||
PathBuf::from("/apps/aaredaq-pxiii/src/server.py")
|
||||
|
||||
+5
-1
@@ -117,7 +117,11 @@ impl<'a> EntriesTab<'a> {
|
||||
let [list_area, detail_area] =
|
||||
Layout::horizontal([Constraint::Percentage(30), Constraint::Min(0)]).areas(area);
|
||||
|
||||
let items: Vec<ListItem> = self.keys.iter().map(|k| ListItem::new(k.as_str())).collect();
|
||||
let items: Vec<ListItem> = self
|
||||
.keys
|
||||
.iter()
|
||||
.map(|k| ListItem::new(k.as_str()))
|
||||
.collect();
|
||||
let list = List::new(items)
|
||||
.block(Block::default().borders(Borders::ALL).title("Entries"))
|
||||
.highlight_style(Style::default().add_modifier(Modifier::BOLD | Modifier::REVERSED))
|
||||
|
||||
+2
-6
@@ -50,10 +50,7 @@ pub fn run(config: &Config) -> Result<Option<(PathBuf, PathBuf)>> {
|
||||
result
|
||||
}
|
||||
|
||||
fn run_app(
|
||||
terminal: &mut DefaultTerminal,
|
||||
config: &Config,
|
||||
) -> Result<Option<(PathBuf, PathBuf)>> {
|
||||
fn run_app(terminal: &mut DefaultTerminal, config: &Config) -> Result<Option<(PathBuf, PathBuf)>> {
|
||||
let mut app = App::new(config);
|
||||
|
||||
loop {
|
||||
@@ -129,8 +126,7 @@ fn draw(frame: &mut Frame, app: &mut App) {
|
||||
_ => app.custom.draw(frame, content_area),
|
||||
}
|
||||
|
||||
let footer = Paragraph::new(help_text(app))
|
||||
.style(Style::default().add_modifier(Modifier::DIM));
|
||||
let footer = Paragraph::new(help_text(app)).style(Style::default().add_modifier(Modifier::DIM));
|
||||
frame.render_widget(footer, footer_area);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user