Skip to content

Commit

Permalink
Create bun:test CI (#4)
Browse files Browse the repository at this point in the history
* Create bun:test CI

Co-authored-by: Isabelle Papa <ispapa@users.noreply.github.com>
Co-authored-by: Jordan Praissman <jpraissman@users.noreply.github.com>

* fix lockfile

* fix deps

* fix path

---------

Co-authored-by: Isabelle Papa <ispapa@users.noreply.github.com>
Co-authored-by: Jordan Praissman <jpraissman@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 26, 2024
1 parent 80ba80c commit be0b705
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/bun-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Run Bun Tests

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.1.27

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run tests
run: bun test
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"workspaces": [
"apps/*",
"packages/*",
"tooling/*"
"tooling/*",
"test"
],
"scripts": {
"__BUILD_____________": "",
Expand Down
1 change: 1 addition & 0 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
..
13 changes: 13 additions & 0 deletions test/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import baseConfig from "@good-dog/eslint/base";
import nextjsConfig from "@good-dog/eslint/nextjs";
import reactConfig from "@good-dog/eslint/react";

/** @type {import('typescript-eslint').Config} */
export default [
{
ignores: [],
},
...baseConfig,
...nextjsConfig,
...reactConfig,
];
5 changes: 5 additions & 0 deletions test/example.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { expect, test } from "bun:test";

test("2 + 2", () => {
expect(2 + 2).toBe(4);
});
1 change: 1 addition & 0 deletions test/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const name = "test";
23 changes: 23 additions & 0 deletions test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@good-dog/test",
"private": true,
"version": "0.1.0",
"type": "module",
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"format": "prettier --check . --ignore-path ../.gitignore",
"lint": "eslint",
"typecheck": "tsc --noEmit --emitDeclarationOnly false"
},
"devDependencies": {
"@good-dog/eslint": "workspace:*",
"@good-dog/prettier": "workspace:*",
"@good-dog/typescript": "workspace:*",
"@types/bun": "^1.1.10",
"eslint": "9.10.0",
"prettier": "3.2.5",
"typescript": "5.4.5"
},
"prettier": "@good-dog/prettier"
}
8 changes: 8 additions & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@good-dog/typescript/base.json",
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["**/*.test.ts", "*.ts"],
"exclude": ["node_modules"]
}

0 comments on commit be0b705

Please sign in to comment.