Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeboone02 committed Nov 7, 2024
1 parent 86d468b commit 843d641
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"installCommand": "codesandbox-ci",
"buildCommand": "build",
"sandboxes": ["/example"],
"node": "18"
}
17 changes: 17 additions & 0 deletions .codesandbox/ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# CodeSandbox CI doesn't have the `alias` or `source` commands available,
# so we can't use the line below (the preferred installation method).
# curl -fsSL https://bun.sh/install | bash

# We can use an npm global install, but we have to override the
# npm_config_user_agent environment variable. Otherwise, Bun throws
# an error about not being compatible with Yarn because it sees Yarn's
# user agent string since CodeSandbox always runs `yarn run ...`.
# See https://github.com/oven-sh/bun/issues/2530.
npm_config_user_agent="npm/? node/?" npm install --global bun
# Use this to pin Bun version:
# npm_config_user_agent="npm/? node/?" npm install --global [email protected]

# Now we can get on with business...
bun install --frozen-lockfile
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [jakeboone02]
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: CI
on: [push, pull_request, workflow_dispatch]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install --frozen-lockfile
- run: bun --bun run build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Official [react-querybuilder](https://npmjs.com/package/react-querybuilder) comp
>
> This package is only compatible with Chakra UI **version 2**.
>
> For Chakra UI version 3 compatibility, use [`@react-querybuilder/chakra`](https://npmjs.com/package/@react-querybuilder/chakra).
> For Chakra UI version 3 compatibility, use [`@react-querybuilder/chakra`](https://npmjs.com/package/@react-querybuilder/chakra) >= 8.
- [Demo (using latest Chakra UI)](https://react-querybuilder.js.org/demo/chakra)
- [Full documentation](https://react-querybuilder.js.org/)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
"typecheck:watch": "tsc --noEmit --watch",
"pretty-print": "prettier --config prettier.config.mjs --write '*.*' './src/**' './dev/**' './example/**'",
"pretty-check": "prettier --config prettier.config.mjs --check '*.*' './src/**' './dev/**' './example/**'",
"are-the-types-wrong": "attw --format table-flipped --pack ."
"are-the-types-wrong": "attw --format table-flipped --pack .",
"codesandbox-ci": "bash .codesandbox/ci.sh"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.16.4",
Expand Down

0 comments on commit 843d641

Please sign in to comment.