leo/.github/workflows/leo-clean.yml

77 lines
1.7 KiB
YAML
Raw Normal View History

2021-01-18 00:33:20 +03:00
name: leo-clean
2020-08-04 07:00:57 +03:00
on:
pull_request:
push:
branches:
- master
2020-12-17 19:23:45 +03:00
paths-ignore:
- 'docs/**'
- 'documentation/**'
2020-08-04 07:00:57 +03:00
env:
RUST_BACKTRACE: 1
jobs:
new:
2020-08-29 10:32:13 +03:00
name: Hello Leo ('leo new hello-world')
2020-08-04 07:00:57 +03:00
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
2021-01-18 00:57:48 +03:00
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2020-08-04 07:00:57 +03:00
- name: Install Leo
uses: actions-rs/cargo@v1
with:
command: install
2021-01-18 00:33:54 +03:00
args: --path .
2020-08-04 07:00:57 +03:00
2020-08-29 10:32:13 +03:00
- name: 'leo new hello-world'
2020-08-04 07:00:57 +03:00
run: |
cd ..
2020-08-29 10:32:13 +03:00
leo new hello-world
2020-08-04 07:06:18 +03:00
ls -la
2020-08-29 10:32:13 +03:00
cd hello-world && ls -la
2020-08-04 07:00:57 +03:00
leo run
2020-08-04 07:03:47 +03:00
- 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
2021-01-17 21:33:52 +03:00
- name: 'leo clean'
2020-08-04 07:03:47 +03:00
run: |
2021-01-18 00:58:31 +03:00
cd ../hello-world
2021-01-17 21:33:52 +03:00
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