Skip to content

fix regress ci problems #783

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

Merged
merged 2 commits into from
Dec 7, 2023
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
6 changes: 3 additions & 3 deletions .github/workflows/diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
diffs: ${{ steps.regress-ci.outputs.diffs }}
if: ${{ github.event.issue.pull_request }}
if: github.event.issue.pull_request && (contains(github.event.comment.body, '\n/ci') || startsWith(github.event.comment.body, '/ci'))
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -55,15 +55,15 @@ jobs:
with:
tool: git-delta

- run: cargo regress diff ${{ matrix.command }} --use-pager-directly
- run: cargo regress diff --use-pager-directly ${{ matrix.command }}
env:
GH_TOKEN: ${{ github.token }}
GITHUB_PR: ${{ matrix.pr }}
GIT_PAGER: delta --hunk-header-style omit
summary:
runs-on: ubuntu-latest
needs: [diff, generate]
if: always() && needs.generate.outputs.diffs != '{}' && needs.generate.outputs.diffs != '[]' && needs.generate.outputs.diffs != ''
if: always() && needs.generate.outputs.diffs != '{}' && needs.generate.outputs.diffs != '[]' && needs.generate.outputs.diffs != '' && needs.generate.result == 'success'
steps:
- uses: actions/checkout@v4

Expand Down
4 changes: 2 additions & 2 deletions ci/svd2rust-regress/src/svd_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use svd2rust::{util::ToSanitizedCase, Target};
use crate::{command::CommandExt, tests::TestCase, Opts, TestOpts};
use std::io::prelude::*;
use std::path::PathBuf;
use std::process::{Command, Output};
use std::process::Command;
use std::{
fmt::Write as _,
fs::{self, File, OpenOptions},
Expand Down Expand Up @@ -340,7 +340,7 @@ impl TestCase {
src_files.sort();

for entry in src_files {
let output = Command::new(rustfmt_bin_path)
Command::new(rustfmt_bin_path)
.arg(entry)
.args(["--edition", "2021"])
.capture_outputs(
Expand Down