File: coverage.yml

package info (click to toggle)
python-awkward 2.8.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 25,144 kB
  • sloc: python: 182,845; cpp: 33,828; sh: 432; makefile: 21; javascript: 8
file content (84 lines) | stat: -rw-r--r-- 2,174 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
name: Codecov

on:
  push:
    branches:
      - main
    paths-ignore:
      - README.md
      - CONTRIBUTING.md
      - CITATION.cff
      - LICENSE
      - .readthedocs.yml
      - docs-img/**
      - docs/**
      - awkward-cpp/docs/**
      - studies/**

  workflow_dispatch:

concurrency:
  group: 'coverage-${{ github.head_ref || github.run_id }}'
  cancel-in-progress: true

env:
  # Leverage reproducible builds by setting a constant SOURCE_DATE_EPOCH
  # This will ensure that the hash of the awkward-cpp directory remains
  # constant for unchanged files, meaning that it can be used for caching
  SOURCE_DATE_EPOCH: "1668811211"

jobs:
  coverage:
    runs-on: ubuntu-latest
    name: Run Codecov

    env:
      PIP_ONLY_BINARY: cmake
      PYTHON_VERSION: "3.9"

    steps:
      - uses: actions/checkout@v5
        with:
          submodules: true

      - name: 'Python ${{ env.PYTHON_VERSION }}'
        uses: actions/setup-python@v6
        with:
          python-version: '${{ env.PYTHON_VERSION }}'

      - name: Generate build files
        run: pipx run nox -s prepare -- --headers --signatures --tests

      - name: Cache awkward-cpp wheel
        id: cache-awkward-cpp-wheel
        uses: actions/cache@v4
        with:
          path: ./awkward-cpp/dist
          key: ${{ github.job }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('awkward-cpp/**') }}

      - name: Build awkward-cpp wheel
        if: steps.cache-awkward-cpp-wheel.outputs.cache-hit != 'true'
        run: |
          python -m pip install build
          python -m build -w ./awkward-cpp
          ls ./awkward-cpp/dist

      - name: Install awkward-cpp
        run: python -m pip install -v ./awkward-cpp/dist/*.whl

      - name: Build & install awkward
        run: python -m pip install -v .

      - name: Print versions
        run: python -m pip list

      - name: Install test requirements
        run: python -m pip install -v -r requirements-test-full.txt

      - name: Test
        run: >-
          python -m pytest -vv -rs tests --cov=awkward --cov-report=term
          --cov-report=xml

      - name: Upload Codecov results
        uses: codecov/codecov-action@v5