Skip to content
Merged
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
16 changes: 9 additions & 7 deletions template/.github/workflows/ci.yml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
CS_ACCESS_TOKEN: ${{ "{{" }} secrets.CS_ACCESS_TOKEN {{ "}}" }}
CODESCENE_CLI_SHA256: ${{ "{{" }} vars.CODESCENE_CLI_SHA256 {{ "}}" }}
{% if use_rust %}
WHITAKER_INSTALLER_REV: f768c2e53c47df13658af1168a67851d388750bf
WHITAKER_INSTALLER_VERSION: '0.2.5'
CARGO_TERM_COLOR: always
BUILD_PROFILE: debug
{% endif %}
Expand Down Expand Up @@ -50,10 +50,8 @@ jobs:
env:
RUSTFLAGS: ""
run: |
cargo install --locked \
--git https://github.com/leynos/whitaker \
--rev "${WHITAKER_INSTALLER_REV}" \
whitaker-installer
cargo binstall --no-confirm --locked \
whitaker-installer@"${WHITAKER_INSTALLER_VERSION}"
whitaker-installer --cranelift
cargo install --locked cargo-audit

Expand Down Expand Up @@ -82,7 +80,7 @@ jobs:
run: make audit

- name: Test and Measure Coverage
uses: leynos/shared-actions/.github/actions/generate-coverage@455d9ed03477c0026da96c2541ca26569a74acac
uses: leynos/shared-actions/.github/actions/generate-coverage@296dc4aa07acf3a7f60a54fb6bccb5672a597479
with:
output-path: coverage.xml
format: cobertura
Expand All @@ -94,10 +92,14 @@ jobs:
- name: Install CodeScene Coverage CLI
if: env.CS_ACCESS_TOKEN != ''
run: |
curl -fsSL https://downloads.codescene.io/enterprise/cli/install-cs-coverage-tool.sh | bash -s -- -y
curl -fsSL --output install-cs-coverage-tool.sh \
https://downloads.codescene.io/enterprise/cli/install-cs-coverage-tool.sh
if [ -n "${CODESCENE_CLI_SHA256:-}" ]; then
echo "${CODESCENE_CLI_SHA256} install-cs-coverage-tool.sh" | sha256sum -c -
else
echo "::notice::CODESCENE_CLI_SHA256 is not set; skipping installer checksum verification"
fi
bash install-cs-coverage-tool.sh -y

- name: Upload coverage to CodeScene
if: env.CS_ACCESS_TOKEN != ''
Expand Down
6 changes: 2 additions & 4 deletions template/Makefile.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CLIPPY_FLAGS ?= $(CARGO_FLAGS) -- $(RUST_FLAGS)
TEST_FLAGS ?= $(CARGO_FLAGS)
TEST_CMD := $(if $(CARGO_AVAILABLE),$(if $(shell $(CARGO) nextest --version 2>/dev/null),nextest run,test),)
WHITAKER_CARGO_FLAGS ?= --all-targets --all-features
WHITAKER_INSTALLER_REV ?= f768c2e53c47df13658af1168a67851d388750bf
WHITAKER_INSTALLER_VERSION ?= 0.2.5
WHITAKER ?= $(or $(shell command -v whitaker 2>/dev/null),$(wildcard $(USER_WHITAKER)),whitaker)
{% endif %}

Expand Down Expand Up @@ -108,9 +108,7 @@ whitaker: ## Install Whitaker when the generated Rust lint target needs it
exit 1; \
}; \
$(CARGO) install --locked \
--git https://github.com/leynos/whitaker \
--rev "$(WHITAKER_INSTALLER_REV)" \
whitaker-installer; \
whitaker-installer --version "$(WHITAKER_INSTALLER_VERSION)"; \
PATH="$(HOME)/.cargo/bin:$$PATH" whitaker-installer --cranelift; \
fi

Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/ci_contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def assert_ci_coverage_action_contract(
assert (
coverage_step.get("uses")
== "leynos/shared-actions/.github/actions/generate-coverage"
"@455d9ed03477c0026da96c2541ca26569a74acac"
"@296dc4aa07acf3a7f60a54fb6bccb5672a597479"
), "expected CI to use the pinned shared coverage action"
coverage_inputs = require_mapping(coverage_step, "with", "coverage step")
assert coverage_inputs.get("output-path") == "coverage.xml", (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def _ci_workflow(*, persist_credentials: str, coverage_inputs: str) -> str:
with:
persist-credentials: {persist_credentials}
- name: Test and Measure Coverage
uses: leynos/shared-actions/.github/actions/generate-coverage@455d9ed03477c0026da96c2541ca26569a74acac
uses: leynos/shared-actions/.github/actions/generate-coverage@296dc4aa07acf3a7f60a54fb6bccb5672a597479
with:
output-path: coverage.xml
format: cobertura
Expand Down
Loading