mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-24 19:03:27 +03:00
Add leo add and remove to circleci
This commit is contained in:
parent
e29100c70f
commit
303c69e863
@ -99,6 +99,19 @@ jobs:
|
||||
export LEO=/home/circleci/project/project/bin/leo
|
||||
./project/.circleci/leo-clean.sh
|
||||
|
||||
leo-add-remove:
|
||||
docker:
|
||||
- image: cimg/rust:1.50.0
|
||||
resource_class: xlarge
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /home/circleci/project/
|
||||
- run:
|
||||
name: leo add & remove
|
||||
command: |
|
||||
export LEO=/home/circleci/project/project/bin/leo
|
||||
./project/.circleci/leo-add-remove.sh
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
main-workflow:
|
||||
@ -113,3 +126,6 @@ workflows:
|
||||
- leo-clean:
|
||||
requires:
|
||||
- rust-stable
|
||||
- leo-add-remove:
|
||||
requires:
|
||||
- rust-stable
|
||||
|
6
.circleci/leo-add-remove.sh
Executable file
6
.circleci/leo-add-remove.sh
Executable file
@ -0,0 +1,6 @@
|
||||
# leo add (w/o login) & remove
|
||||
|
||||
$LEO new my-app && cd my-app
|
||||
$LEO add howard/silly-sudoku
|
||||
$LEO remove silly-sudoku
|
||||
$LEO clean
|
76
.github/workflows/leo-clean.yml
vendored
76
.github/workflows/leo-clean.yml
vendored
@ -1,76 +0,0 @@
|
||||
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
|
Loading…
Reference in New Issue
Block a user