Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Morganamilo committed Nov 5, 2023
1 parent 2b3bbb7 commit d97bb0a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/paru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
image: archlinux
steps:
- name: Install Packages
run: pacman -Syu rust clang gcc libarchive pkgconf sudo fakeroot --noconfirm --needed
run: pacman -Syu rust clang gcc git libarchive pkgconf sudo fakeroot --noconfirm --needed

- name: Checkout
uses: actions/checkout@v2
Expand All @@ -36,7 +36,7 @@ jobs:
run: cargo build --locked --features generate

- name: Test
run: sudo -u nobody BUILDDIR=/tmp PKGDEST=/tmp SRCDEST=/tmp CARGO_HOME=/tmp/cargo cargo test --locked --features generate,mock --target-dir=/tmp -- --test-threads=1 --nocapture
run: sudo -u nobody XDG_STATE_HOME=/tmp CARGO_HOME=/tmp/cargo cargo test --locked --features generate,mock --target-dir=/tmp -- --nocapture

test-git:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -65,4 +65,4 @@ jobs:
run: cargo build --locked --features git,generate

- name: Test
run: sudo -u nobody BUILDDIR=/tmp PKGDEST=/tmp SRCDEST=/tmp CARGO_HOME=/tmp/cargo cargo test --locked --features git,generate,mock --target-dir=/tmp -- --test-threads=1 --nocapture
run: sudo -u nobody XDG_STATE_HOME=/tmp CARGO_HOME=/tmp/cargo cargo test --locked --features git,generate,mock --target-dir=/tmp -- --nocapture
2 changes: 0 additions & 2 deletions testdata/clone/devel/.SRCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ pkgbase = devel
pkgver = 1
pkgrel = 1
arch = any
source = git+file:////Users/morganamilo/git/paru/testdata/clone/devel/../../git-repo
sha256sums = SKIP

pkgname = devel
2 changes: 0 additions & 2 deletions testdata/clone/devel/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ pkgname=devel
pkgver=2
pkgrel=1
arch=(any)
source=(git+file:///$PWD/../../git-repo)
sha256sums=(SKIP)
2 changes: 1 addition & 1 deletion testdata/devel.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[[devel]]
url = "file:////Users/morganamilo/git/paru/testdata/clone/devel/../../git-repo"
url = "testdata/git-repo"
commit = "deadbeef"
5 changes: 3 additions & 2 deletions tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async fn run(run_args: &[&str], repo: bool) -> Result<(TempDir, i32)> {
}

std::fs::create_dir_all(dir.join("cache/pkg"))?;
std::fs::create_dir_all(testdata.join("pkg"))?;
let _ = std::fs::create_dir_all(testdata.join("pkg"));

let mut file = fs::OpenOptions::new()
.append(true)
Expand Down Expand Up @@ -181,9 +181,10 @@ async fn run(run_args: &[&str], repo: bool) -> Result<(TempDir, i32)> {

for pkg in std::fs::read_dir(dir.join("cache/pkg"))? {
let path = pkg?.path();

let name = path.file_name().unwrap().to_str().unwrap();
if name.ends_with(".pkg.tar.zst") {
std::fs::rename(&path, testdata.join("pkg").join(name))?;
let _ = std::fs::rename(&path, testdata.join("pkg").join(name));
}
}

Expand Down

0 comments on commit d97bb0a

Please sign in to comment.