mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-25 18:42:26 +03:00
Add leo clean to circleci
This commit is contained in:
parent
345d09d186
commit
808e631014
@ -81,11 +81,24 @@ jobs:
|
||||
- attach_workspace:
|
||||
at: /home/circleci/project/
|
||||
- run:
|
||||
name: leo new
|
||||
name: leo init
|
||||
command: |
|
||||
export LEO=/home/circleci/project/project/bin/leo
|
||||
./project/.circleci/leo-init.sh
|
||||
|
||||
leo-clean:
|
||||
docker:
|
||||
- image: cimg/rust:1.49.0
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/circleci/project/
|
||||
- run:
|
||||
name: leo clean
|
||||
command: |
|
||||
export LEO=/home/circleci/project/project/bin/leo
|
||||
./project/.circleci/leo-clean.sh
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
main-workflow:
|
||||
@ -97,3 +110,6 @@ workflows:
|
||||
- leo-init:
|
||||
requires:
|
||||
- rust-stable
|
||||
- leo-clean:
|
||||
requires:
|
||||
- rust-stable
|
||||
|
33
.circleci/leo-clean.sh
Executable file
33
.circleci/leo-clean.sh
Executable file
@ -0,0 +1,33 @@
|
||||
# leo new hello-world
|
||||
|
||||
$LEO new hello-world
|
||||
ls -la
|
||||
cd hello-world && ls -la
|
||||
$LEO run
|
||||
|
||||
# Assert that the 'outputs' folder is not empty
|
||||
|
||||
cd outputs || exit 1
|
||||
if [ "$(ls -A $DIR)" ]; then
|
||||
echo "$DIR is not empty"
|
||||
else
|
||||
echo "$DIR is empty"
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
|
||||
# leo clean
|
||||
|
||||
$LEO clean
|
||||
cd outputs && ls -la
|
||||
|
||||
# Assert that the 'outputs' folder is empty
|
||||
|
||||
cd outputs || exit 1
|
||||
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
48
.github/workflows/leo-init.yml
vendored
@ -1,48 +0,0 @@
|
||||
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
|
49
.github/workflows/leo-new.yml
vendored
49
.github/workflows/leo-new.yml
vendored
@ -1,49 +0,0 @@
|
||||
name: leo-new
|
||||
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
|
Loading…
Reference in New Issue
Block a user