File: build.yml

package info (click to toggle)
python-laspy 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,124 kB
  • sloc: python: 9,474; makefile: 20
file content (109 lines) | stat: -rw-r--r-- 2,558 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Build

on:
  push:
    branches:
    - 'main'
  pull_request:
    branches:
    - '*'
jobs:
  build:
    name: Python ${{ matrix.python-version }} - ${{ matrix.os }} - ${{ matrix.env }}

    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
        python-version: [ "3.11", "3.12", "3.13", "3.14" ]
        env: [ dev, dev-laszip, dev-lazrs, dev-all ]

    steps:
    - uses: actions/checkout@v5

    - uses: actions/setup-python@v6
      with:
        python-version: ${{ matrix.python-version }}

    - name: Display Python version
      run: python -c "import sys; print(sys.version)"

    - name: Install hatch
      run: pip install hatch

    - name: Run Tests
      run: |
        hatch run ${{matrix.env}}:python --version
        hatch run ${{matrix.env}}:test


  # Check that we can import laspy in an environment that does
  # not have dev deps installed to make sure there are no wrong imports
  import:
    name: Python ${{ matrix.python-version }} - ${{ matrix.os }} - laz=${{ matrix.laz-backend }}

    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
        python-version: [ "3.13" ]
        laz-backend: [ None, lazrs, laszip ]

    steps:
      - uses: actions/checkout@v5

      - uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}

      - name: Display Python version
        run: |
          python -c "import sys; print(sys.version)"

      - name: Install With LAZ backend
        if: matrix.laz-backend != 'None'
        run: pip install .[${{ matrix.laz-backend }},pyproj,cli]

      - name: Install Without LAZ backend
        if: matrix.laz-backend == 'None'
        run: pip install .[pyproj,cli]

      - name: Import laspy
        run: |
          python -c "import laspy"

  linting:
    runs-on: ubuntu-latest

    steps:
      - name: Clone
        uses: actions/checkout@v5

      - uses: actions/setup-python@v6
        with:
          python-version: 3.13

      - name: Install hatch
        run: pip install hatch

      - name: Run lints
        run: hatch fmt --check

  coverage:
    runs-on: ubuntu-latest

    steps:
      - name: Clone
        uses: actions/checkout@v5

      - name: Install
        run: |
          python3 -m pip install .[dev]

      - name: Run coverage
        run: |
          nox -s coverage
          coverage combine
          coverage report