You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Run the 'toc' script to generate/update the TOC in README.md.
42
+
# The 'doctoc' package should be installed as a devDependency and handled by 'npm ci'.
43
+
npm run toc
44
+
45
+
# Check if 'doctoc' made any changes to README.md.
46
+
# 'git diff --exit-code' returns a non-zero exit code if there are differences.
47
+
git diff --exit-code README.md || (echo "Error: README.md Table of Contents is not up to date. Please run 'npm run toc' locally and commit the changes." && exit 1)
48
+
env:
49
+
CI: true # Ensure CI environment is recognized, if needed by doctoc
50
+
51
+
# Optional: Upload coverage to Codecov (only if enabled and token is provided)
52
+
- name: Upload coverage to Codecov
53
+
uses: codecov/codecov-action@v4
54
+
with:
55
+
token: ${{ secrets.CODECOV_TOKEN }}
56
+
files: ./coverage/lcov.info # Path to your lcov coverage file
57
+
if: success() && secrets.CODECOV_TOKEN # Only run if previous steps succeeded and token exists
0 commit comments