Files
dotfiles/.github/workflows/test.yml
Dict Xiong 277c124d3b feat: unify scf discovery and fix shell tooling bugs
- scf: discover referenced text files with source-based ordering; cache canonical paths and bound scans, parsing and candidate display
- config: rewrite config includes atomically
- installer: preserve configuration contents, permissions and links; fix dry-run
- updater: recover stale updater scripts and report update failures
- riot: fix riot batches, dry runs, empty arguments and IPv6 SCP paths
- frigg: propagate Frigg authentication failures
- add offline regression tests and CI coverage

Signed-off-by: Dict Xiong <me@dxng.cn>
2026-11-18 09:25:33 +08:00

119 lines
2.8 KiB
YAML

name: test
on:
push: ~
workflow_dispatch: ~
jobs:
test-offline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run offline regression tests
run: |
bash tools/test-getopts.sh
bash tools/test-install.sh
bash tools/test-update.sh
bash tools/test-riot.sh
bash tools/test-riot-gpg.sh
bash tools/test-sagent-gpg-pin.sh
bash tools/test-scf.sh
bash tools/test-frigg-client.sh
test-signed-updates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: bash tools/test-signed-updates.sh
test-ubuntu:
name: test on ubuntu
runs-on: ubuntu-latest
# The legacy integration tests exercise the live release channel.
env:
DFS_IGNORE_COMMIT_SIGN: "1"
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
env:
DFS_IGNORE_COMMIT_SIGN: "1"
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
env:
DFS_IGNORE_COMMIT_SIGN: "1"
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