Skip to content

Commit

Permalink
Add github workflow (#111)
Browse files Browse the repository at this point in the history
* Add github workflow

* Fix test by introducing src/ directory

* Fix lint issues + add drizzle to be ignored by prettier

* Add pnpm config to github workflow runner

* Reset session to be the correct commit

* Fix .yml syntax
  • Loading branch information
nichochar authored Jul 10, 2024
1 parent d04eb5a commit a30e15a
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 4 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests.
# For now we only run against node 22.x, but can easily add more node versions should we decide to support them.
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js + pnpm CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
app:
runs-on: ubuntu-latest

strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [22.x]

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: true

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Lint
run: pnpm run check-prettier

- name: Check that the application can successfully build
run: pnpm run build

- name: Test
run: pnpm --filter api test
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pnpm*.yaml
pnpm*.yaml
packages/api/drizzle/*
2 changes: 1 addition & 1 deletion packages/api/test/srcmd_files/mock_notebook_dir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ With some **bold** text and some _italic_ text.
###### foo.mjs

[foo.mjs](./foo.mjs)
[foo.mjs](./src/foo.mjs)

```json
{ "simple": "codeblock" }
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';

import { cn } from '@/lib/utils';

export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> { }
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}

const Input = React.forwardRef<HTMLInputElement, InputProps>(
({ className, type, ...props }, ref) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/components/ui/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';

import { cn } from '@/lib/utils';

export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> { }
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}

const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className, ...props }, ref) => {
Expand Down

0 comments on commit a30e15a

Please sign in to comment.