feat: replace kv with cheaper alternative d1 #20
Workflow file for this run
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
name: Checks | |
# | |
# NOTE: | |
# everything under the 'checkout' step is temporary until I figure out how to use devenv.sh in gh actions | |
# devenv has a guide for actions: https://devenv.sh/integrations/github-actions | |
# but it doesn't work if you are using devenv this way: https://devenv.sh/guides/using-with-flakes | |
on: | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
defaults: | |
run: | |
shell: bash | |
env: | |
NAME: 'url-shortener' | |
ACTIONS_RUNNER_DEBUG: true | |
jobs: | |
checks: | |
runs-on: ['ubuntu-latest'] | |
steps: | |
- name: 🔑 Checkout | |
uses: actions/checkout@v4 | |
- name: 🦀 Set up Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: wasm32-unknown-unknown | |
components: rustc, cargo, rustfmt, clippy | |
- name: Setup Rust Cache | |
uses: Swatinem/rust-cache@v2.7.5 | |
with: | |
prefix-key: v0 # increment this to bust the cache if needed | |
- name: Install sccache | |
uses: mozilla-actions/sccache-action@v0.0.6 | |
env: | |
RUSTC_WRAPPER: 'sccache' | |
SCCACHE_GHA_ENABLED: true | |
- name: 🐰 Set up Bun | |
uses: oven-sh/setup-bun@main | |
with: | |
bun-version: 'latest' | |
- name: Format | |
run: | | |
bunx @taplo/cli@latest fmt *.toml | |
cargo fmt --all --check | |
- name: Lint | |
run: | | |
bunx @taplo/cli@latest lint *.toml | |
cargo clippy --all-targets --all-features -- -D warnings | |
- name: 🛠️ Build worker | |
run: cargo install --quiet worker-build && worker-build --release |