Skip to content

Commit

Permalink
add testrunner to ci and release
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurnikov committed Nov 6, 2020
1 parent 6da812a commit ae46848
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ jobs:
- name: Test
run: cargo test --all --no-fail-fast

- name: testrunner test
run: cargo run --bin testrunner -- --sender 0x1 --modules resources/assets/stdlib/ --modules resources/assets/modules/ resources/assets/runner_tests/

- name: Run clippy
run: cargo clippy --tests --examples -- -Dwarnings

Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,26 @@ jobs:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}\target\release\executor_cli.exe
asset_name: move-executor-${{ matrix.platform }}.exe
asset_content_type: application/octet-stream
asset_content_type: application/octet-stream

- name: Test Runner - upload binary as Release Asset (ubuntu, macos)
if: matrix.os != 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/release/testrunner
asset_name: test-runner-${{ matrix.platform }}
asset_content_type: application/octet-stream

- name: Test Runner - upload binary as Release Asset (windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}\target\release\testrunner.exe
asset_name: test-runner-${{ matrix.platform }}.exe
asset_content_type: application/octet-stream
2 changes: 2 additions & 0 deletions check_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ fi
cargo +stable clippy --tests --workspace -- -Dwarnings

cargo test --all

cargo run --bin testrunner -- --sender 0x1 --modules resources/assets/stdlib/ --modules resources/assets/modules/ resources/assets/runner_tests/
File renamed without changes.
4 changes: 0 additions & 4 deletions executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,5 @@ pub fn execute_script(
sources.extend(deps);
let session = SessionBuilder::new(dialect.as_ref(), &sender).build(&sources, &[])?;

if !session.is_executable() {
return Err(anyhow::anyhow!("No scripts found"));
}

session.execute(script_args, dialect.cost_table())
}
9 changes: 0 additions & 9 deletions executor/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ pub struct ExecutionSession {
}

impl ExecutionSession {
pub fn is_executable(&self) -> bool {
for unit in &self.units {
if let ExecutionUnit::Script(_) = unit {
return true;
}
}
false
}

pub fn consts(&self) -> &ConstsMap {
&self.consts
}
Expand Down
3 changes: 0 additions & 3 deletions resources/assets/runner_tests/00_no_script.move

This file was deleted.

0 comments on commit ae46848

Please sign in to comment.