trash.sh/.drone.yml
Kim 3d01dba823
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
fix drone pipeline
2021-10-28 02:07:09 +02:00

81 lines
1.7 KiB
YAML

kind: pipeline
type: docker
name: default
workspace:
path: /root
steps:
- name: install
image: bash:latest
pull: if-not-exists
commands:
- echo ". $HOME/trash.sh" > $HOME/.bashrc
- . $HOME/.bashrc
- ls -la $HOME/.trash/
- type trash
- name: test trash_empty
depends_on:
- install
image: bash:latest
pull: if-not-exists
commands:
- . $HOME/.bashrc
- for i in 1 2 3 4; do touch /tmp/testfile$i; done
- ls -l /tmp
- trash /tmp/testfile*
- ls -l /tmp
- trash_list
- ls -la $HOME/.trash/
- trash_empty
- trash_list
- ls -la $HOME/.trash/
- name: test trash_restore
depends_on:
- install
- test trash_empty
image: bash:latest
pull: if-not-exists
commands:
- . $HOME/.bashrc
- for i in 1 2 3 4; do touch /tmp/testfile$i; done
- ls -l /tmp
- trash /tmp/testfile*
- ls -l /tmp
- cat $HOME/.trash/.filepaths
- trash_list
- ls -la $HOME/.trash/
- trash_restore testfile2 testfile3
- ls -l /tmp
- ls -la $HOME/.trash/
- name: test trash_rm
depends_on:
- install
- test trash_restore
image: bash:latest
pull: if-not-exists
commands:
- . $HOME/.bashrc
- for i in 1 2 3 4; do touch /tmp/testfile$i; done
- ls -l /tmp
- trash /tmp/testfile*
- ls -l /tmp
- trash_list
- ls -la $HOME/.trash/
- trash_rm testfile2 testfile3
- trash_list
- ls -la $HOME/.trash/
- name: test usage
depends_on:
- install
- test trash_restore
image: bash:latest
pull: if-not-exists
commands:
- . $HOME/.bashrc
- trash | grep required