Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
workflow_call:
workflow_dispatch:

permissions: {}

jobs:
check_nims:
name: Check NIMS
Expand All @@ -18,9 +20,14 @@ jobs:
check_nimg:
name: Check NIMG
uses: ./.github/workflows/check_nimg.yml
check_workflows:
name: Check workflows
uses: ./.github/workflows/check_workflows.yml
permissions:
security-events: write
checks_succeeded:
name: Checks succeeded
needs: [check_nims, check_nims_docs, check_nimg]
needs: [check_nims, check_nims_docs, check_nimg, check_workflows]
runs-on: ubuntu-latest
steps:
- run: exit 0
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
run_ci:
name: Run CI
uses: ./.github/workflows/CI.yml
permissions:
checks: write
pull-requests: write
pull-requests: write
security-events: write
4 changes: 4 additions & 0 deletions .github/workflows/check_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ on:
workflow_call:
workflow_dispatch:

permissions: {}

jobs:
check_examples:
name: Check examples
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
id: setup-python
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/check_nimg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_call:
workflow_dispatch:

permissions: {}

jobs:
check_nimg:
name: Check NIMG
Expand All @@ -21,6 +23,8 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
id: setup-python
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/check_nims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_call:
workflow_dispatch:

permissions: {}

jobs:
check_nims:
name: Check NIMS
Expand All @@ -23,6 +25,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
id: setup-python
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/check_nims_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_call:
workflow_dispatch:

permissions: {}

jobs:
check_nims:
name: Check NIMS Docs
Expand All @@ -17,6 +19,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: true
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
id: setup-python
Expand All @@ -30,4 +33,4 @@ jobs:
mkdir -p docs
poetry run sphinx-build _docs_source docs -b html -W
- name: Revert docs
run: rm -rf docs
run: rm -rf docs
21 changes: 21 additions & 0 deletions .github/workflows/check_workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check workflows

on:
workflow_call:
workflow_dispatch:

permissions: {}

jobs:
zizmor:
name: Run zizmor
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run zizmor
uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6
16 changes: 15 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ env:
"service": "ni_measurement_plugin_sdk_service"
}

permissions: {}

jobs:
# Do not call check_examples.yml because the examples may depend on the version we are releasing.
check_nimg:
Expand All @@ -56,10 +58,14 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
- name: Set up Poetry
uses: ni/python-actions/setup-poetry@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
with:
use-cache: false
- name: Check project version
if: github.event_name == 'release'
uses: ni/python-actions/check-project-version@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
Expand Down Expand Up @@ -105,10 +111,14 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
- name: Set up Poetry
uses: ni/python-actions/setup-poetry@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
with:
use-cache: false
- name: Get version
id: get-version
run: echo "version=$(poetry version --short)" >> "$GITHUB_OUTPUT"
Expand All @@ -122,7 +132,7 @@ jobs:
mkdir -p dist
git archive -o dist/${EXAMPLE_ARCHIVE}.zip ${GITHUB_REF}:examples/
git archive -o dist/${EXAMPLE_ARCHIVE}.tar.gz --prefix ${EXAMPLE_ARCHIVE}/ ${GITHUB_REF}:examples/
- name: Upload release assets
- name: Upload release assets # zizmor: ignore[superfluous-actions]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

https://docs.zizmor.sh/audits/#superfluous-actions

They suggest replacing this action with gh CLI, but I don't want to rewrite this part of the publish workflow right now.

if: ${{ startsWith(github.event.release.target_commitish, 'main') || startsWith(github.event.release.target_commitish, 'releases/') }}
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
with:
Expand All @@ -143,10 +153,14 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
- name: Set up Poetry
uses: ni/python-actions/setup-poetry@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
with:
use-cache: false
# Create one pull request that updates all three packages.
- name: Update generator project version
uses: ni/python-actions/update-project-version@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/report_test_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_call:
workflow_dispatch:

permissions: {}

jobs:
report_test_results:
name: Report test results
Expand All @@ -14,6 +16,8 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Download test results
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
Expand All @@ -26,4 +30,4 @@ jobs:
uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2.23.0
with:
files: "test_results/**/*.xml"
if: always()
if: always()
4 changes: 4 additions & 0 deletions .github/workflows/run_system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_call:
workflow_dispatch:

permissions: {}

jobs:
run_system_tests:
name: Run system tests
Expand All @@ -22,6 +24,8 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Copy and rename .env.simulation to .env
run: cp examples/.env.simulation .env

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_call:
workflow_dispatch:

permissions: {}

jobs:
run_unit_tests:
name: Run unit tests
Expand All @@ -19,6 +21,8 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python
uses: ni/python-actions/setup-python@a2894c635a2cba635a1086c1f89796fec2c52f74 # v0.7.2
id: setup-python
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/sync_github_issues_to_azdo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,24 @@ on:
issue_comment:
types: [created, edited, deleted]

permissions: {}

jobs:
alert:
if: ${{ !github.event.issue.pull_request && github.event.issue.title != 'Dependency Dashboard' }}
runs-on: ubuntu-latest
steps:
- name: Choose work item type
id: choose_work_item_type
run: |
if [ "${{ contains(github.event.issue.labels.*.name, 'enhancement') || contains(github.event.issue.labels.*.name, 'user story') }}" == "true" ]; then
echo "work_item_type=User Story" >> $GITHUB_OUTPUT
elif [ "${{ contains(github.event.issue.labels.*.name, 'tech debt') }}" == "true" ]; then
echo "work_item_type=Technical Debt" >> $GITHUB_OUTPUT
else
echo "work_item_type=Bug" >> $GITHUB_OUTPUT
fi
- uses: danhellem/github-actions-issue-to-work-item@45eb3b46e684f2acd2954f02ef70350c835ee4bb # v2.4
env:
ado_token: "${{ secrets.AZDO_WORK_ITEM_TOKEN }}"
github_token: "${{ secrets.GH_REPO_TOKEN }}"
ado_organization: "ni"
ado_project: "DevCentral"
ado_area_path: "DevCentral\\Product RnD\\Platform HW and SW\\SW New Invest and Tech\\ETW\\InstrumentStudio\\Core\\Platform"
ado_wit: "${{ steps.choose_work_item_type.outputs.work_item_type }}"
ado_wit: "${{ case(
contains(github.event.issue.labels.*.name, 'enhancement') || contains(github.event.issue.labels.*.name, 'user story'), 'User Story',
contains(github.event.issue.labels.*.name, 'tech debt'), 'Technical Debt',
'Bug') }}"
ado_new_state: "New"
ado_active_state: "Active"
ado_close_state: "Closed"
Expand Down
Loading