dotfiles/.github/workflows/test.yml
Dict Xiong 9a7f0b1b06
install.sh: support combined options (#24)
* install.sh: support combined short options

* ci: use combined opt

* debug

Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
2022-11-11 10:36:50 +08:00

126 lines
2.9 KiB
YAML

name: test
on:
push: ~
workflow_dispatch: ~
jobs:
test-ubuntu:
name: test on ubuntu
runs-on: ubuntu-latest
steps:
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install -y git python3 python3-pip zsh curl inetutils-ping
sudo pip3 install requests
- name: checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install dfs
run: |
rev=`git rev-parse HEAD`
pwd
./install.sh -dl
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
- name: antigen build with DFS_NO_WALL
shell: /bin/zsh -ileo PIPE_FAIL {0}
env:
DFS_NO_WALL: 1
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-12
steps:
- name: install dependencies
run: |
brew update
brew install git python3 zsh curl
sudo pip3 install requests
- name: checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install dfs
run: |
rev=`git rev-parse HEAD`
pwd
./install.sh -dl
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
- name: antigen build with DFS_NO_WALL
shell: /bin/zsh -ileo PIPE_FAIL {0}
env:
DFS_NO_WALL: 1
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@v3
with:
fetch-depth: 0
- name: install dfs
run: |
rev=`git rev-parse HEAD`
./install.sh -dal
test `git rev-parse HEAD` = "$rev"
- name: antigen build with DFS_NO_WALL
shell: /bin/zsh -ileo PIPE_FAIL {0}
env:
DFS_NO_WALL: 1
run: |
echo $SHELL
antigen list