Skip to content

Commit

Permalink
add check_no_git_refs_in_cargo_lock to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage authored and gustavovalverde committed Nov 23, 2024
1 parent 0d730bc commit 77dbf9d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/sub-ci-unit-tests-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,12 @@ jobs:
# If there is already an open issue with this label, any failures become comments on that issue.
always-create-new-issue: false
github-token: ${{ secrets.GITHUB_TOKEN }}

run-check-no-git-refs:
if: contains(github.event.pull_request.labels.*.name, 'A-release')
runs-on: ubuntu-latest
steps:
- name: Run check_no_git_refs_in_cargo_lock
run: |
docker pull ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ inputs.image_digest }}
docker run --tty -e NETWORK -e RUN_CHECK_NO_GIT_REFS=1 ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ inputs.image_digest }}
8 changes: 6 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,16 @@ case "$1" in
if [[ "${RUN_ALL_TESTS}" -eq "1" ]]; then
# Run unit, basic acceptance tests, and ignored tests, only showing command output if the test fails.
# If the lightwalletd environmental variables are set, we will also run those tests.
exec cargo test --locked --release --features "${ENTRYPOINT_FEATURES}" --workspace -- --nocapture --include-ignored
exec cargo test --locked --release --features "${ENTRYPOINT_FEATURES}" --workspace -- --nocapture --include-ignored --exclude check_no_git_refs_in_cargo_lock

elif [[ "${RUN_ALL_EXPERIMENTAL_TESTS}" -eq "1" ]]; then
# Run unit, basic acceptance tests, and ignored tests with experimental features.
# If the lightwalletd environmental variables are set, we will also run those tests.
exec cargo test --locked --release --features "${ENTRYPOINT_FEATURES_EXPERIMENTAL}" --workspace -- --nocapture --include-ignored
exec cargo test --locked --release --features "${ENTRYPOINT_FEATURES_EXPERIMENTAL}" --workspace -- --nocapture --include-ignored --exclude check_no_git_refs_in_cargo_lock

elif [[ "${RUN_CHECK_NO_GIT_REFS}" -eq "1" ]]; then
# Run the check_no_git_refs_in_cargo_lock test.
exec cargo test --locked --release --features "${ENTRYPOINT_FEATURES}" --workspace -- --nocapture --include-ignored check_no_git_refs_in_cargo_lock

elif [[ "${TEST_FAKE_ACTIVATION_HEIGHTS}" -eq "1" ]]; then
# Run state tests with fake activation heights.
Expand Down

0 comments on commit 77dbf9d

Please sign in to comment.