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
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
pull_request:

env:
otp: "28.0"
gleam: "1.15.2"
otp: "29.x"
gleam: "1.17.0"
rebar: "3"
nodelts: "22.x"
nodelts: "24.x"

jobs:
build:
Expand Down Expand Up @@ -40,6 +40,8 @@ jobs:

windows-erlang:
runs-on: windows-latest
env:
ImageOS: win25
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
Expand All @@ -49,13 +51,12 @@ jobs:
rebar3-version: ${{ env.rebar }}
- run: git.exe config --global user.email "cactus-windows-erlang-test@example.com"
- run: git.exe config --global user.name "cactus-windows erlang-test"
- run: gleam.exe run --target erlang
- run: gleam.exe test --target erlang
- run: git.exe checkout -b test-erlang-windows
- run: git.exe push --dry-run --set-upstream origin test-erlang-windows
- run: bash ./scripts/target_test.sh erlang

windows-node:
runs-on: windows-latest
env:
ImageOS: win25
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
Expand All @@ -70,16 +71,13 @@ jobs:
- run: yarn install
- run: git.exe config --global user.email "cactus-windows-node-test@example.com"
- run: git.exe config --global user.name "cactus-windows node-test"
- run: gleam.exe run --target javascript --runtime nodejs
- run: gleam.exe test --target javascript --runtime nodejs
- run: git.exe checkout -b test-node-windows
- run: git.exe push --dry-run --set-upstream origin test-node-windows
- run: bash ./scripts/target_test.sh javascript nodejs

node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, 24.x]
node-version: [24.x]
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,42 @@ name: Dependency Check

on:
schedule:
# run every friday at 9am UTC
- cron: "0 9 * * 6"
push:
branches:
- main
pull_request:

env:
otp: "28.0"
gleam: "1.15.2"
otp: "29.x"
gleam: "1.17.0"
rebar: "3"

jobs:
check-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v5
with:
path: |
build
.go-over/
key: ${{ runner.os }}-deps-check-${{ hashFiles('**/manifest.toml') }}
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.otp }}
gleam-version: ${{ env.gleam }}
rebar3-version: ${{ env.rebar }}
- run: gleam build
- run: gleam run -m go_over -- --outdated
- run: gleam run -m go_over -- --format sarif --sarif-output go-over.sarif --local
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: go-over.sarif
- run: gleam deps outdated
# create an issue in the repo if there are
# outdated or vulnerable dependencies
- uses: jayqi/failed-build-issue-action@v1
if: failure()
with:
Expand Down
8 changes: 4 additions & 4 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gleam 1.15.2
erlang 28.0.2
nodejs 22.17.1
deno 2.4.2
gleam 1.17.0
erlang 29.0.2
nodejs 24.16.0
deno 2.8.3
77 changes: 77 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Changelog

All notable changes to this project will be documented in this file.

## 1.4.1

### Added

- Warning when pre-commit/pre-merge-commit cannot stash because a git stash
already exists and the working tree is still dirty

### Changed

- `pre-merge-commit` uses the same stash/pop behavior as `pre-commit`
- File filters respect `cwd`: only paths under the action's `cwd` are considered
- **`skip_if` removed** — use `skip_env` instead (e.g. `skip_env = "CI=true"`)
- `skip_env` supported at hook and action level; values may contain `=` (parsed
via first `=`)

### Removed

- `skip_if` — replaced by `skip_env` for all skip conditions

### Fixed

- `always_init` re-init errors are no longer swallowed during hook runs
- Invalid `always_init` type surfaces a config error instead of defaulting to
`false`
- Carriage returns stripped from git file list output (Windows compatibility)
- Hook script creation tolerates existing `.git/hooks` directory or hook file
- `--config` with Windows drive paths (`D:/...`) no longer joined against cwd

## 1.4.0

### Added

- `files_scope` at hook and action level (`staged`, `all`, `unstaged`)
- `on_failure` hook option (`stop` or `continue`)
- `skip_if = "ci"` (skips when `CI=true` or `CI=1`)
- `skip_env` per action (`NAME=value`)
- `env` inline table per action
- `cwd` per action
- CLI: `clean`, `--verbose`, `--dry-run`, `--config`
- Pre-commit stash/pop with `cactus-pre-commit` tag

### Changed

- Requires Gleam 1.x (`gleam_stdlib >= 1.0`)
- Hook scripts embed compile target and JS runtime — re-run `init` after
changing target/runtime
- `always_init` on hook run respects Windows platform for hook templates
- File-filtered actions skip when no files in scope match watched patterns
- Pre-commit does not stash when unrelated stashes already exist on the stack

### Fixed

- `skip_if = "ci"` no longer treats `CI=false` as a CI environment
- Pre-commit reports an error when cactus stash cannot be restored after a
successful stash
- Stash pop failures take precedence over hook action failures when both occur

### Glob limitations

Glob matching supports:

- Extension suffixes (e.g. `.gleam`)
- Exact paths
- Simple globs with `*` and `**/` (e.g. `src/**/*.gleam`, `*.gleam`)

Not supported:

- Multiple `*` wildcards in a single path segment (e.g. `*.*.gleam`)
- Full POSIX glob semantics

## 1.3.5

Previous stable release on `main`.
Loading
Loading