Skip to content

Commit

Permalink
Merge pull request #14 from informalsystems/gabriela/github-action
Browse files Browse the repository at this point in the history
Create github action
  • Loading branch information
bugarela authored Apr 5, 2024
2 parents 527b3c6 + e6fbe0d commit c54b8ec
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: cosmwasm-to-quint

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- uses: actions-rs/install@v0.1
with:
crate: cargo-insta
version: latest
use-tool-cache: true

- name: Install nightly toolchain with rustc components and wasm target
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-01-06
override: true
components: clippy, rust-src, rustc-dev, llvm-tools-preview
target: wasm32-unknown-unknown

- name: Install cosmwasm-to-quint
run: cargo install --path . --debug --locked
shell: bash

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: insta
args: test
4 changes: 1 addition & 3 deletions tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn run(dir: &str, f: impl FnOnce(&mut Command)) -> Result<String> {

let _ = fs::remove_dir_all(ws.join("target"));

let output = cmd.output().context("Process failed AA")?;
let output = cmd.output().context("Process failed")?;
ensure!(
output.status.success(),
"Process exited with non-zero exit code. Stderr:\n{}",
Expand All @@ -47,8 +47,6 @@ fn run(dir: &str, f: impl FnOnce(&mut Command)) -> Result<String> {
Ok(String::from_utf8(output.stdout)?)
}

// TODO: why do these tests need to be run sequentially?

#[test]
fn ctf01() -> Result<()> {
let output = run("cosmwasm-ctf/ctf-01", |_cmd| {})?;
Expand Down

0 comments on commit c54b8ec

Please sign in to comment.