Skip to content

Commit

Permalink
setup: add tests and github workflow (#7)
Browse files Browse the repository at this point in the history
Adds tests, lints, prettier checks, etc.
  • Loading branch information
hf authored May 25, 2024
1 parent 2aebffe commit 7935934
Show file tree
Hide file tree
Showing 6 changed files with 1,581 additions and 120 deletions.
9 changes: 9 additions & 0 deletions .eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// @ts-check

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
);
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
pull_request:

jobs:
lint:
name: Format
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4

- run: npm ci

- name: Prettier
run: |
npx prettier --check .
- name: eslint
run: |
npx eslint
build:
name: Build and test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4

- run: npm ci

- name: Build
run: |
npm run build
- name: Test
run: |
npm run test
Loading

0 comments on commit 7935934

Please sign in to comment.