name: leo-clean on: pull_request: push: branches: - master paths-ignore: - 'docs/**' - 'documentation/**' env: RUST_BACKTRACE: 1 jobs: new: name: Hello Leo ('leo new hello-world') runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v1 - name: Install Rust uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: nightly override: true components: rustfmt - uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install Leo uses: actions-rs/cargo@v1 with: command: install args: --path . - name: 'leo new hello-world' run: | cd .. leo new hello-world ls -la cd hello-world && ls -la leo run - name: Assert that the 'outputs' folder is not empty run: | cd ../hello-world/outputs if [ "$(ls -A $DIR)" ]; then echo "$DIR is not empty" else echo "$DIR is empty" exit 1 fi - name: 'leo clean' run: | cd ../hello-world leo clean cd outputs && ls -la - name: Assert that the 'outputs' folder is empty run: | cd ../hello-world/outputs if [ "$(ls -A $DIR)" ]; then echo "$DIR is not empty" exit 1 else echo "$DIR is empty" exit 0 fi