CI: Add new assessments to verify workflow, improve Git tag check
Some checks failed
/ verify (push) Has been cancelled

This commit is contained in:
Juno Takano 2026-06-04 16:49:50 -03:00
commit 7d68ee3a88
4 changed files with 31 additions and 22 deletions

View file

@ -39,9 +39,12 @@ jobs:
useradd -m ci && chown -R ci:ci . useradd -m ci && chown -R ci:ci .
git config --global --add safe.directory "$PWD" git config --global --add safe.directory "$PWD"
- name: Build - name: Text matching checks
run: just ci build run: just ci todos-assess version-assess spell
- name: Schema lint
run: just ci schema-lint
- name: Deny
run: just ci deny
- name: Format - name: Format
run: just ci format-assess run: just ci format-assess
- name: Lint - name: Lint

View file

@ -51,7 +51,7 @@ alias wc := run-watch-containerized
[private] [private]
assess-quick: assess-quick:
{{ just_cmd }} lint check test-cover-quick spell {{ just_cmd }} lint check test-cover-quick spell schema-lint
[private] [private]
assess-run-quick: assess-run-quick:
@ -219,8 +219,8 @@ mutate-single *cargo_test_args:
# Tag HEAD with version from Cargo.toml # Tag HEAD with version from Cargo.toml
[script, group: 'assess'] [script, group: 'assess']
tag commit="HEAD": update tag commit="HEAD": update
if [ "{{ last_tag }}" = "{{ manifest_version }}" ]; then if [ "{{ last_local_tag }}" = "{{ manifest_version }}" ]; then
echo "Last tag {{ last_tag }} and manifest ({{ manifest_version }}) already match" echo "Last tag {{ last_local_tag }} and manifest ({{ manifest_version }}) already match"
exit exit
elif [ "{{ manifest_version }}" != "{{ lockfile_version }}" ]; then elif [ "{{ manifest_version }}" != "{{ lockfile_version }}" ]; then
echo "Manifest and lockfile versions don't match: update failed?" echo "Manifest and lockfile versions don't match: update failed?"
@ -231,15 +231,15 @@ tag commit="HEAD": update
{{ just_cmd }} version-assess {{ just_cmd }} version-assess
# Verify and push # Verify and push
[group: 'develop'] [group: 'develop', env("JUST", "1")]
push: verify push: verify && (version-assess "true")
git push git push
git push --tags git push --tags
alias p := push alias p := push
# Push without verifying # Push without verifying
[group: 'develop'] [group: 'develop', env("JUST", "1")]
push-unsafe: push-unsafe:
git push --no-verify git push --no-verify
git push --tags --no-verify git push --tags --no-verify
@ -355,16 +355,22 @@ alias v := verify
# Check tag-manifest consistency # Check tag-manifest consistency
[script, group: 'assess'] [script, group: 'assess']
version-assess: update [arg("remote", long="remote", short="r", value="true")]
if version-assess remote="false": update
[ "{{ last_tag }}" != "{{ lockfile_version }}" ] \ last_remote_tag=$(
|| [ "{{ last_tag }}" != "{{ lockfile_version }}" ] git ls-remote --tags --sort=-creatordate origin |
then head -n 1 | tr -d v | cut -d / -f 3
printf 'Last tag: %s\nManifest: %s\nLockfile: %s\n' \ )
"{{ last_tag }}" \ printf 'Local: %s\nRemote: %s\nManifest: %s\nLockfile: %s\n' \
"{{ manifest_version }}" \ "{{ last_local_tag }}" \
"{{ lockfile_version }}" "$last_remote_tag" \
exit 1 "{{ manifest_version }}" \
"{{ lockfile_version }}"
test "{{ last_local_tag }}" = "{{ lockfile_version }}"
test "{{ last_local_tag }}" = "{{ manifest_version }}"
if {{ if remote == "true" { "true" } else { "false" } }}; then
echo test "{{ last_local_tag }}" = "$last_remote_tag"
test "{{ last_local_tag }}" = "$last_remote_tag"
fi fi
alias va := version-assess alias va := version-assess
@ -481,7 +487,7 @@ just_cmd_no_ts := 'just --explain --command-color green'
watch_cmd := "watchexec -qc -r -e rs,toml,html,css --color always -- " watch_cmd := "watchexec -qc -r -e rs,toml,html,css --color always -- "
cover_cmd := 'cargo llvm-cov --color always --ignore-filename-regex "main\.rs|log\.rs"' cover_cmd := 'cargo llvm-cov --color always --ignore-filename-regex "main\.rs|log\.rs"'
last_tag := `git tag --sort=-creatordate | head -1 | tr -d v` last_local_tag := `git tag --sort=-creatordate | head -1 | tr -d v`
manifest_version := `grep "^version" Cargo.toml | cut -d \" -f 2` manifest_version := `grep "^version" Cargo.toml | cut -d \" -f 2`
lockfile_version := ``` lockfile_version := ```
grep -A 1 'name = "en"' Cargo.lock \ grep -A 1 'name = "en"' Cargo.lock \

2
Cargo.lock generated
View file

@ -238,7 +238,7 @@ dependencies = [
[[package]] [[package]]
name = "en" name = "en"
version = "0.4.1-alpha" version = "0.4.0-alpha"
dependencies = [ dependencies = [
"axum", "axum",
"serde", "serde",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "en" name = "en"
version = "0.4.1-alpha" version = "0.4.0-alpha"
description = "A non-linear writing instrument." description = "A non-linear writing instrument."
license = "AGPL-3.0-only" license = "AGPL-3.0-only"