Skip to content

Commit

Permalink
Setup GitHub Actions (#9)
Browse files Browse the repository at this point in the history
* Fix formatting with prettier

* Add GitHub action for tests, types, and linting
  • Loading branch information
rileytomasek authored Oct 14, 2022
1 parent afbbdd6 commit 4e9df2d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn lint
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn test
types:
name: Types
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn typecheck
8 changes: 4 additions & 4 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/// <reference types="vitest" />

import { defineConfig } from "vite";
import { defineConfig } from 'vite';

export default defineConfig({
test: {
watch: false,
globals: true,
environment: "node",
include: ["./src/**/*.test.ts"],
watchExclude: [".*\\/node_modules\\/.*", ".*\\/build\\/.*"],
environment: 'node',
include: ['./src/**/*.test.ts'],
watchExclude: ['.*\\/node_modules\\/.*', '.*\\/build\\/.*'],
},
});

0 comments on commit 4e9df2d

Please sign in to comment.