]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Add RUN_ONLY_TEST to limit which tests are run.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 9 May 2025 20:37:24 +0000 (06:37 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 9 May 2025 21:44:48 +0000 (07:44 +1000)
For testing, you can set the repo variable RUN_ONLY_TEST in your repo
(Repo -> Settings -> Security -> Actions -> Variables) to run only that test.

.github/workflows/c-cpp.yml

index 424c193fb207cb6aa83ec60fad4874e025deeb78..b5b6de7fa3fb7e4e4c437a34ffeac69135bd58be 100644 (file)
@@ -111,6 +111,12 @@ jobs:
           - { target: macos-15, config: pam }
     runs-on: ${{ matrix.target }}
     steps:
+    - name: check RUN_ONLY_TEST
+      # For testing, you can set the repo variable RUN_ONLY_TEST in your repo
+      # (Repo -> Settings -> Security -> Actions -> Variables) to run only
+      # that test config.
+      if: vars.RUN_ONLY_TEST != ''
+      run: sh -c 'if [ "${{ vars.RUN_ONLY_TEST }}" != "${{ matrix.target }} ${{matrix.config }}" ]; then exit 1; else exit 0; fi'
     - name: set cygwin git params
       if: ${{ startsWith(matrix.target, 'windows') }}
       run: git config --global core.autocrlf input