Skip to content

Commit

Permalink
build(justfile): replace Make with just
Browse files Browse the repository at this point in the history
  • Loading branch information
dbohdan committed May 26, 2024
1 parent 52175d0 commit 31e3a1c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 24 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download and install Caddy
run: wget --output-document caddy.deb --quiet https://github.com/caddyserver/caddy/releases/download/v2.7.6/caddy_2.7.6_linux_amd64.deb && sudo dpkg -i caddy.deb
- name: Download and install Deno
run: wget --output-document deno.zip --quiet https://github.com/denoland/deno/releases/download/v1.40.3/deno-x86_64-unknown-linux-gnu.zip && unzip deno.zip deno && sudo install deno /usr/local/bin/
- name: Checkout
uses: actions/checkout@v4
- name: Set up just
uses: extractions/setup-just@v2
- name: Run tests
run: make test
run: just test
15 changes: 0 additions & 15 deletions Makefile

This file was deleted.

13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ the style sheet.

## Requirements

* Caddy 2.4 or later.
* Optional:
* [Deno](https://deno.land/) 1.31 or later to run the [tests](test.ts)
(`make test`).
* [entr](https://github.com/eradman/entr) for development
(`make dev`).
- Caddy 2.4 or later.
- Optional:
- [Deno](https://deno.land/) 1.31 or later to run the [tests](test.ts)
(`just test`).
- [entr](https://github.com/eradman/entr) for development
(`just dev`).
- [just](https://github.com/casey/just).


## License
Expand Down
19 changes: 19 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

caddy := "caddy"

default: test

[unix]
dev:
find . -type f | entr -r {{quote(caddy)}} run

test:
deno test \
--allow-env \
--allow-net \
--allow-read=Caddyfile \
--allow-run \
--allow-write=Caddyfile.test \
test.ts \
;

0 comments on commit 31e3a1c

Please sign in to comment.