attmpt to fix gh actions ci again

This commit is contained in:
damirka 2021-04-26 16:18:34 +03:00
parent f520201017
commit 2e9be1a2ba
3 changed files with 14 additions and 9 deletions

View File

@ -53,7 +53,7 @@ jobs:
- run:
name: Run tests
no_output_timeout: 30m
command: cargo build && cargo test --all
command: LEO=/home/circleci/project/project/bin/leo cargo test --all
- persist_to_workspace:
root: ~/
paths: project/
@ -71,7 +71,7 @@ jobs:
- run:
name: Run tests
no_output_timeout: 30m
command: cargo build && cargo test --all
command: LEO=/home/circleci/project/project/bin/leo cargo test --all
- clear_environment:
cache_key: leo-nightly-cache
@ -214,8 +214,12 @@ workflows:
version: 2
main-workflow:
jobs:
- leo-executable
- rust-stable
requires:
- leo-executable
- rust-nightly
requires:
- leo-executable
- leo-new:
requires:

View File

@ -114,10 +114,11 @@ jobs:
override: true
components: rustfmt
- name: Build Leo binary
uses: actions-rs/cargo@v1
with:
command: build
- name: Install Leo binary and set env
run: |
cargo install --path .
export LEO=$(which leo)
printenv
- name: Test
uses: actions-rs/cargo@v1

View File

@ -21,7 +21,7 @@ use test_dir::{DirBuilder, FileType, TestDir};
/// Create Command from given arguments and CWD.
fn command(args: &str, cwd: Option<PathBuf>) -> Command {
let args = args.split(' ').collect::<Vec<&str>>();
let mut cmd = Command::cargo_bin("leo").unwrap();
let mut cmd = Command::cargo_bin("leo").unwrap_or_else(|_| Command::new(std::env::var("LEO").unwrap()));
if let Some(cwd) = cwd {
cmd.current_dir(cwd);