fix: Add glob, user dir and env var support on Windows #310
Workflow file for this run
This file contains 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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
python-version: [3.8, 3.9, '3.10', '3.11', '3.12', pypy-3.9] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: setup.py | |
- run: pip install .[test] coveralls | |
- env: | |
LANG: en_US.UTF-8 | |
PYTHONIOENCODING: utf-8 | |
PYTHONUTF8: 1 | |
run: pytest --cov csvkit | |
# csvpy cannot accept input as piped data via STDIN. | |
- name: Read from stdin | |
if: matrix.os != 'windows-latest' | |
run: | | |
csvclean -a < examples/dummy.csv | |
csvcut < examples/dummy.csv | |
csvformat < examples/dummy.csv | |
csvgrep -c1 -m1 < examples/dummy.csv | |
csvjoin < examples/dummy.csv | |
csvjson < examples/dummy.csv | |
csvlook < examples/dummy.csv | |
csvsort < examples/dummy.csv | |
csvsql < examples/dummy.csv | |
csvstack < examples/dummy.csv | |
csvstat < examples/dummy.csv | |
in2csv -f csv < examples/dummy.csv | |
sql2csv < examples/test.sql | |
- name: Read from pipe | |
run: | | |
printf 'a,b,c\n1,2,3' | csvclean -a | |
printf 'a,b,c\n1,2,3' | csvcut | |
printf 'a,b,c\n1,2,3' | csvformat | |
printf 'a,b,c\n1,2,3' | csvgrep -c1 -m1 | |
printf 'a,b,c\n1,2,3' | csvjoin | |
printf 'a,b,c\n1,2,3' | csvjson | |
printf 'a,b,c\n1,2,3' | csvlook | |
printf 'a,b,c\n1,2,3' | csvsort | |
printf 'a,b,c\n1,2,3' | csvsql | |
printf 'a,b,c\n1,2,3' | csvstack | |
printf 'a,b,c\n1,2,3' | csvstat | |
printf 'a,b,c\n1,2,3' | in2csv -f csv | |
printf 'SELECT 1 AS a' | sql2csv | |
- env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: coveralls --service=github |