File: ci.yml

package info (click to toggle)
python-agate 1.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,008 kB
  • sloc: python: 8,578; makefile: 126
file content (42 lines) | stat: -rw-r--r-- 1,590 bytes parent folder | download
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
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:
      - if: matrix.os == 'ubuntu-latest'
        name: Install UTF-8 locales and lxml requirements
        run: |
          sudo apt install libxml2-dev libxslt-dev
          sudo locale-gen de_DE.UTF-8
          sudo locale-gen en_US.UTF-8
          sudo locale-gen ko_KR.UTF-8
          sudo update-locale
      - 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
      - if: matrix.python-version == '3.8'
        run: pip install 'lxml<5'
      - env:
          LANG: en_US.UTF-8
          PYTHONIOENCODING: utf-8
          PYTHONUTF8: 1
        run: pytest --cov agate
      - name: Read from stdin
        if: matrix.os != 'windows-latest'
        run: python -c 'import sys; import agate; agate.Table.from_csv(sys.stdin, sniff_limit=1)' < examples/test.csv
      - name: Read from pipe
        run: printf 'a,b,c\n1,2,3' | python -c 'import sys; import agate; agate.Table.from_csv(sys.stdin, sniff_limit=1)'
      - run: python charts.py
      - env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: coveralls --service=github