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
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,50 @@ on:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run build
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- name: Verify lib/ matches source
id: verify-lib
run: |
if [ "$(git diff --ignore-space-at-eol --text -- lib/ | wc -l)" -gt "0" ] \
|| [ -n "$(git ls-files --others --exclude-standard -- lib/)" ]; then
echo "Committed lib/ is out of sync with src/. Run npm ci && npm run build and commit lib/."
git diff --ignore-space-at-eol --text -- lib/
git ls-files --others --exclude-standard -- lib/
exit 1
fi
- if: ${{ failure() && steps.verify-lib.outcome == 'failure' }}
name: Upload expected lib/
uses: actions/upload-artifact@v7
with:
name: lib
path: lib/

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run test
Expand All @@ -32,8 +57,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run lint
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ If you want to contribute to this project, check out these steps!
1. Check out existing features to make sure your case is not already covered. Also, try [searching open or closed issues](https://github.com/EndBug/add-and-commit/issues) that may cover the same topic.
2. Either [open a new issue](https://github.com/EndBug/add-and-commit/issues/new/choose) or comment on an existing one to let everyone know what you're working on.
3. Edit the source files to implement your feature or fix.
4. Build the action and test it in a test repo.
4. On Node.js 24, build the action (`npm ci && npm run build`) and include any `lib/` changes in your commit. With Husky installed, the pre-commit hook rebuilds and stages `lib/` for you. CI fails if the committed `lib/` does not match a clean rebuild. Then test the action in a test repo.
5. Update the [action manifest](./action.yml) AND the [README](./README.md) with your changes.
6. [Open a PR](https://github.com/EndBug/add-and-commit/compare).

Expand Down
16 changes: 8 additions & 8 deletions lib/index.js

Large diffs are not rendered by default.