Skip to content
Closed
11 changes: 10 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ on:
workflow_dispatch:

jobs:
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
Comment on lines +12 to +19
Copy link
Collaborator

@bkeryan bkeryan Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, everything you added uses different naming style than the rest of the workflows

job & step names: Sentence case
job & step ids: snake_case
action/workflow parameters: kebab-case
artifacts: snake_case

path: ${{ github.event_path }}
Comment on lines +12 to +20
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of doing this is so that you can run EnricoMi/publish-unit-test-result-action from a separate job that is invoked by

on:
  workflow_run:
    workflows: ["CI"]
    types:
      - completed

I don't see that anywhere in this PR.

check_nitypes:
name: Check nitypes
uses: ./.github/workflows/check_nitypes.yml
Expand All @@ -30,7 +39,7 @@ jobs:
uses: ./.github/workflows/run_unit_tests_oldest_deps.yml
needs: [checks_succeeded]
report_test_results:
name: Report test results
name: Test Results
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ruleset lists Test Results as a required check in order to ensure that the tests pass. You can't see it because are not a repo admin, but it's documented here: https://dev.azure.com/ni/DevCentral/_wiki/wikis/AppCentral.wiki/139879/GitHub-Branch-Protection-Rules-and-Rulesets

You created two other checks with this name, but I don't think either one guarantees that the tests pass.

uses: ./.github/workflows/report_test_results.yml
needs: [run_unit_tests, run_unit_tests_oldest_deps]
if: always()
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/report_test_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
workflow_dispatch:

jobs:
report_test_results:
name: Report test results
test-results:
name: Test Results
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -24,7 +24,7 @@ jobs:
- name: List downloaded files
run: ls -lR
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@34d7c956a59aed1bfebf31df77b8de55db9bbaaf # v2.21.0
uses: EnricoMi/publish-unit-test-result-action@v2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is less secure and there is no reason to change it.

with:
files: "test_results/**/*.xml"
if: always()
if: (!cancelled())
6 changes: 3 additions & 3 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
run: poetry run pytest ./tests/unit -v --cov=nitypes --junitxml=test_results/nitypes-${{ matrix.os }}-py${{ matrix.python-version }}.xml
- name: Run benchmarks
run: poetry run pytest ./tests/benchmark -v --junitxml=test_results/nitypes-benchmarks-${{ matrix.os }}-py${{ matrix.python-version }}.xml
- name: Upload test results
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
- name: Upload Test Results
if: (!cancelled())
uses: actions/upload-artifact@v4
with:
name: test_results_unit_${{ matrix.os }}_py${{ matrix.python-version }}
path: ./test_results/*.xml
if: always()
8 changes: 4 additions & 4 deletions .github/workflows/run_unit_tests_oldest_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ jobs:
- name: Run unit tests and code coverage
# Skip test___pickled_value___unpickle___is_compatible because this test's pickle data was saved with NumPy 2.x and cannot be loaded in NumPy 1.x.
run: poetry run pytest ./tests/unit -v --cov=nitypes --junitxml=test_results/nitypes-oldest-deps-${{ matrix.os }}-py${{ matrix.python-version }}.xml -k "not test___pickled_value___unpickle___is_compatible"
- name: Upload test results
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
- name: Upload Test Results
if: (!cancelled())
uses: actions/upload-artifact@v4
with:
name: test_results_unit_oldest_deps_${{ matrix.os }}_py${{ matrix.python-version }}
name: test_results_oldest_deps_${{ matrix.os }}_py${{ matrix.python-version }}
path: ./test_results/*.xml
if: always()
15 changes: 15 additions & 0 deletions .github/workflows/test_results_status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Test Results

on:
pull_request:
push:
branches: [main, 'releases/**']

jobs:
test-results:
name: Test Results
runs-on: ubuntu-latest
if: always()
steps:
- name: Set Status
run: echo "Test Results status check satisfied"