Dict Xiong 891bbcacff
[dev] refactor riot; use command; remove log; sagt op (#45)
* feat(riot-config): default port 12022

* fix(ci)

* feat(riot-config): remove tailing dot from .domain; remove j.remote and x.domain

* feat(riot): *.batch

* feat(riot): run command in tmux window(s)

note that spaces in ssh commands are still not supported

* feat(riot): -o RequestTTY=yes

* fix(riot): SSH_OPTIONS

* fix(riot): tmux use bash

* feat(zshrc): use()

* fix(riot): scp, and ci

note that riot still has problems with spaces. we should use array to
handle parameters.

* fix(ci): update macos image

* feat: update email

* feat: revert git email

* feat(ssh): update keys

* feat(sagent): sagt op

* fix(sagent): error note

* fix(ci): test of auto-dep

* feat(ssh): remove keys ltp1-bd and ltp1

* feat(riot): rm - remove host keys

* build(ci): update to ubuntu-latest and Yikun/hub-mirror-action@v1.5

* feat: remove frigg-client.log

* feat(riot): -t or --trust to set RIOT_TRUST_SERVER

* feat(zshrc/alias): add sc and t, remove cps and mvs

feat(zshrc/plugins): add man and web-search, remove ufw

* feat(riot): refactor argparse

feat(riot): add `--password` and `--`

feat(common.sh): argparse supports `--`

feat(riot): refactor ping to ping remote

* feat(riot): sshd can specify the local port

* feat(riot): print help when no argument or no remote

* fix(riot): ci

* feat(riot): better print_cmd with escape

* feat(riot-config): support sed*

* fix(frigg): hostname converted into lower case
2025-06-24 19:56:04 +08:00

131 lines
3.1 KiB
YAML

name: test
on:
push: ~
workflow_dispatch: ~
jobs:
test-ubuntu:
name: test on ubuntu
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install dfs
run: |
rev=`git rev-parse HEAD`
pwd
set -x
DFS_NO_WALL=0 ./install.sh -adl
test `git rev-parse HEAD` = "$rev"
- name: antigen build
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
echo $SHELL
antigen list
- name: run tests and reset
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
source tools/test.zsh
antigen reset
rm -rf $ANTIGEN $HOME/.antigen $HOME/.config/dotfiles
./install.sh -dl
- name: antigen build with DFS_NO_WALL
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
echo $SHELL
antigen list
- name: run tests
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: source tools/test.zsh
test-macos:
name: test on macos
runs-on: macos-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install dfs
run: |
rev=`git rev-parse HEAD`
pwd
set -x
DFS_NO_WALL=0 ./install.sh -adl
test `git rev-parse HEAD` = "$rev"
- name: antigen build
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
echo $SHELL
antigen list
- name: run tests and reset
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
source tools/test.zsh
antigen reset
rm -rf $ANTIGEN $HOME/.antigen $HOME/.config/dotfiles
./install.sh -dl
- name: antigen build with DFS_NO_WALL
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
echo $SHELL
antigen list
- name: run tests
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: source tools/test.zsh
test-autodep:
name: test of auto-install dependencies
runs-on: ubuntu-latest
steps:
- name: remove dependencies
run: |
sudo apt-get -y remove curl vim
- name: checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install dfs
run: |
rev=`git rev-parse HEAD`
set -x
./install.sh -dal
test `git rev-parse HEAD` = "$rev"
- name: antigen build
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
echo $SHELL
antigen list
test-get-dotfiles-cn:
name: test of get.dotfiles.cn script
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: run the script
run: |
repo=https://github.com/DictXiong/dotfiles bash tools/get.dotfiles.cn -asl
- name: run tests
shell: /bin/zsh -ileo PIPE_FAIL {0}
run: |
dfs cd
source tools/test.zsh