Merge pull request #2837 from midichef/archive_paths #2231
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: visidata-ci-build | |
on: | |
pull_request: | |
branches: | |
- stable | |
- develop | |
push: | |
branches: | |
- stable | |
- develop | |
jobs: | |
run-tests: | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"] | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.pythonversion }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Environment | |
run: | | |
export PYTHONPATH=~/visidata:~/visidata/visidata | |
locale | |
- name: Install Base VisiData | |
run: pip3 install . | |
- name: Ensure VisiData works with Base Dependencies | |
run: vd --version | |
- name: Ensure VisiData can load a dir | |
run: vd . --batch | |
# Apt packages are slow to install, often taking up to a minute. | |
# lxml dependencies are unneeded when installing lxml via pip | |
# - name: Install lxml dependencies | |
# run: sudo apt install -y libxml2-dev libxslt-dev | |
# only needed for testing open-ping, which isn't tested currently anyway | |
# - name: Install ping dependencies | |
# run: sudo apt install -y traceroute | |
# | |
- name: Install optional dependencies | |
run: | | |
pip3 install ".[test]" | |
pip3 install pytest | |
- name: Run unit tests | |
run: | | |
pytest -sv visidata/tests/ | |
- name: Run Cmdlog Tests | |
run: dev/test.sh | |
shell: bash | |
- name: Test macros | |
run: | | |
mkdir -p ~/.visidata | |
cp tests/macros/macros.jsonl tests/macros/1.vdj ~/.visidata/ | |
vd --batch --visidata-dir ~/.visidata -p tests/macros/test_macro.vd --output tests/macros/golden/test_macro.tsv | |
git --no-pager diff --numstat tests/ | |
git --no-pager diff --exit-code tests/ | |
- name: Test replaying input from stdin | |
run: | | |
echo -e '{"a":1}\n{"a":2}' | vd -f jsonl -p dev/stdin.vdj --batch --debug -N | |
- name: Ensure VisiData can create completions | |
run: python -v dev/zsh-completion.py | |
- name: Ensure VisiData does not drop lines from RepeatFiles | |
run: | | |
NUMLINES=$(seq 10000 | vd -b | wc -l) | |
if ! [[ $NUMLINES -eq 10000 ]]; then | |
exit 1 | |
fi |