-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
name: Checks | ||
|
||
n | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
@@ -22,38 +24,37 @@ jobs: | |
- name: 🔑 Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: cachix/install-nix-action@v30 | ||
- name: 🦀 Set up Rust | ||
run: | | ||
rustup set auto-self-update disable | ||
rustup toolchain install 1.81.0 --profile minimal | ||
rustup default 1.81.0 | ||
- name: Setup Cachix | ||
uses: cachix/cachix-action@v15 | ||
- name: Setup Rust Cache | ||
uses: Swatinem/[email protected] | ||
with: | ||
name: 'devenv' | ||
prefix-key: v0 # increment this to bust the cache if needed | ||
|
||
- name: Install devenv.sh | ||
run: nix profile install nixpkgs#devenv | ||
- name: Install sccache | ||
uses: mozilla-actions/[email protected] | ||
env: | ||
RUSTC_WRAPPER: 'sccache' | ||
SCCACHE_GHA_ENABLED: true | ||
|
||
- name: Install direnv | ||
run: | | ||
nix profile install nixpkgs#direnv | ||
nix profile install nixpkgs#nix-direnv | ||
- name: 🐰 Set up Bun | ||
uses: oven-sh/setup-bun@main | ||
with: | ||
bun-version: 'latest' | ||
|
||
- name: Format | ||
run: | | ||
direnv allow | ||
taplo fmt *.toml | ||
bunx taplo@latest fmt *.toml | ||
cargo fmt --all --check | ||
nixfmt *.nix --width=100 | ||
sqlfluff format --dialect sqlite schema.sql | ||
- name: Lint | ||
run: | | ||
direnv allow | ||
taplo lint *.toml | ||
sqlfluff lint --dialect sqlite schema.sql | ||
bunx taplo@latest lint *.toml | ||
cargo clippy --all-targets --all-features -- -D warnings | ||
- name: Build | ||
run: | | ||
direnv allow | ||
cargo build --release --target wasm32-unknown-unknown | ||
- name: 🛠️ Build worker | ||
run: cargo install --quiet worker-build && worker-build --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# URL Shortener - Cloudflare Worker | ||
|
||
## Usage | ||
|
||
> [!NOTE] | ||
|