Skip to content
Open
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
23 changes: 13 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,25 @@
name: Use the user-provided SHA as the basis for comparison
env:
GH_TOKEN: ${{github.token}}
INPUTS_SHA: ${{inputs.sha}}
run: |

Check failure on line 133 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / GitHub Actions workflow checks

shellcheck reported issue in this script: SC2086:info:3:23: Double quote to prevent globbing and word splitting
set -x +e
url="repos/${{github.repository}}/commits/${{inputs.sha}}"
url="repos/${{github.repository}}/commits/${INPUTS_SHA}"
if full_sha="$(gh api $url -q '.sha')"; then
echo "base=$full_sha" >> "$GITHUB_ENV"
else
{
echo "### :x: Workflow error"
echo "The SHA provided to _Run Workflow_ does not exist:"
echo "<code>${{inputs.sha}}</code>"
echo "<code>${INPUTS_SHA}</code>"
} >> "$GITHUB_STEP_SUMMARY"
exit 1
fi

- if: github.event_name != 'workflow_dispatch'
name: Use ref ${{github.ref_name}} as the basis for comparison
run: |

Check failure on line 149 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / GitHub Actions workflow checks

shellcheck reported issue in this script: SC2086:info:1:11: Double quote to prevent globbing and word splitting
echo base=${{github.ref_name}} >> "$GITHUB_ENV"
echo base=${GITHUB_REF_NAME} >> "$GITHUB_ENV"

- name: Check out a copy of the OpenFermion git repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -350,13 +351,14 @@
needs: [changes, pytest-matrix]
runs-on: ubuntu-24.04
steps:
- run: |

Check failure on line 354 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / GitHub Actions workflow checks

shellcheck reported issue in this script: SC1141:error:6:11: Unexpected tokens after compound command. Bad redirection or missing ;/&&/||/|?

Check failure on line 354 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / GitHub Actions workflow checks

shellcheck reported issue in this script: SC1070:error:6:11: Parsing stopped here. Mismatched keywords or invalid parentheses?
result="${{needs.pytest-matrix.result}}"
result="${NEEDS_PYTEST_MATRIX_RESULT}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi
fi env:
NEEDS_PYTEST_MATRIX_RESULT: ${{needs.pytest-matrix.result}}

pytest-extra-matrix:
if: needs.changes.outputs.python == 'true'
Expand Down Expand Up @@ -397,13 +399,14 @@
needs: [changes, pytest-extra-matrix]
runs-on: ubuntu-24.04
steps:
- run: |

Check failure on line 402 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / GitHub Actions workflow checks

shellcheck reported issue in this script: SC1141:error:6:11: Unexpected tokens after compound command. Bad redirection or missing ;/&&/||/|?

Check failure on line 402 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / GitHub Actions workflow checks

shellcheck reported issue in this script: SC1070:error:6:11: Parsing stopped here. Mismatched keywords or invalid parentheses?
result="${{needs.pytest-extra-matrix.result}}"
result="${NEEDS_PYTEST_EXTRA_MATRIX_RESULT}"
if [[ $result == "success" || $result == "skipped" ]]; then
exit 0
else
exit 1
fi
fi env:
NEEDS_PYTEST_EXTRA_MATRIX_RESULT: ${{needs.pytest-extra-matrix.result}}

python-compat:
if: needs.changes.outputs.python == 'true'
Expand Down Expand Up @@ -499,7 +502,7 @@
run: echo '::add-matcher::.github/problem-matchers/jsonlint.json'

- name: Run jsonlint on JSON files
run: jsonlint --continue ${{env.changed_files}}
run: jsonlint --continue ${CHANGED_FILES}

Check failure on line 505 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / GitHub Actions workflow checks

shellcheck reported issue in this script: SC2086:info:1:21: Double quote to prevent globbing and word splitting

cff-validation:
if: needs.changes.outputs.cff == 'true'
Expand Down Expand Up @@ -541,7 +544,7 @@
run: echo '::add-matcher::.github/problem-matchers/hadolint.json'

- name: Run hadolint on Dockerfiles that have been changed
run: hadolint ${{env.changed_files}}
run: hadolint ${CHANGED_FILES}

Check failure on line 547 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / GitHub Actions workflow checks

shellcheck reported issue in this script: SC2086:info:1:10: Double quote to prevent globbing and word splitting

workflow-validation:
if: needs.changes.outputs.gha == 'true'
Expand Down Expand Up @@ -586,7 +589,7 @@
run: echo "::add-matcher::.github/problem-matchers/shellcheck.json"

- name: Run shellcheck on shell scripts that have been changed
run: shellcheck ${{env.changed_files}}
run: shellcheck ${CHANGED_FILES}

Check failure on line 592 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / GitHub Actions workflow checks

shellcheck reported issue in this script: SC2086:info:1:12: Double quote to prevent globbing and word splitting

print-debugging-info:
if: failure()
Expand Down
Loading