File: header-only-test.yml

package info (click to toggle)
python-awkward 2.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,524 kB
  • sloc: python: 187,940; cpp: 33,928; sh: 432; makefile: 21; javascript: 8
file content (41 lines) | stat: -rw-r--r-- 1,017 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
name: Header-only Tests

on:
  pull_request:
  workflow_dispatch:


concurrency:
  group: header-only-test-${{ github.head_ref }}
  cancel-in-progress: true

jobs:
  test:
    name: "Run Tests"
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}

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

    - name: Run CMake
      run: |
        cmake -B build -S header-only -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=bin -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON
        cmake --build build/

    - name: Run tests
      run: |
        import os
        import pathlib
        import subprocess
        for path in pathlib.Path("build/tests/bin").glob("test_*"):
            if path.is_file():
                print(f"Running {path.name}", flush=True)
                print("::group::Test output", flush=True)
                subprocess.run([path], check=True)
                print("::endgroup::", flush=True)
      shell: python3 {0}