Skip to content

feat: possible improvements #23

feat: possible improvements

feat: possible improvements #23

Workflow file for this run

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/[email protected]
with:
prefix-key: v0 # increment this to bust the cache if needed
- name: Install sccache
uses: mozilla-actions/[email protected]
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