-
Notifications
You must be signed in to change notification settings - Fork 603
58 lines (58 loc) · 2.07 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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