mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-30 05:02:04 +03:00
Merge pull request #553 from AleoHQ/feat/ci-cli
Expand ci on leo commands
This commit is contained in:
commit
9e31227522
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -98,6 +98,14 @@ jobs:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
override: true
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
# - name: Check examples
|
||||
# uses: actions-rs/cargo@v1
|
||||
# env:
|
||||
|
76
.github/workflows/leo-clean.yml
vendored
Normal file
76
.github/workflows/leo-clean.yml
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
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
|
48
.github/workflows/leo-init.yml
vendored
Normal file
48
.github/workflows/leo-init.yml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
name: leo-init
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'documentation/**'
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
init:
|
||||
name: Hello Leo ('leo init')
|
||||
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 init'
|
||||
run: |
|
||||
cd .. && mkdir hello-world && cd hello-world
|
||||
leo init
|
||||
ls -la
|
||||
leo run
|
@ -1,4 +1,4 @@
|
||||
name: Leo Binary Tests
|
||||
name: leo-new
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
@ -26,10 +26,16 @@ jobs:
|
||||
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
|
||||
env:
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||
with:
|
||||
command: install
|
||||
args: --path .
|
||||
@ -41,33 +47,3 @@ jobs:
|
||||
ls -la
|
||||
cd hello-world && ls -la
|
||||
leo run
|
||||
|
||||
init:
|
||||
name: Hello Leo ('leo init')
|
||||
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
|
||||
|
||||
- name: Install Leo
|
||||
uses: actions-rs/cargo@v1
|
||||
env:
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||
with:
|
||||
command: install
|
||||
args: --path .
|
||||
|
||||
- name: 'leo init'
|
||||
run: |
|
||||
cd .. && mkdir hello-world && cd hello-world
|
||||
leo init
|
||||
ls -la
|
||||
leo run
|
@ -30,7 +30,7 @@ impl CLI for WatchCommand {
|
||||
type Options = ();
|
||||
type Output = ();
|
||||
|
||||
const ABOUT: AboutType = "Watch the changes of the leo's source files";
|
||||
const ABOUT: AboutType = "Watch for changes of Leo source files";
|
||||
const ARGUMENTS: &'static [ArgumentType] = &[];
|
||||
const FLAGS: &'static [FlagType] = &[];
|
||||
const NAME: NameType = "watch";
|
||||
|
Loading…
Reference in New Issue
Block a user