diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..13a063e --- /dev/null +++ b/.github/workflows/main.yml @@ -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 diff --git a/vitest.config.ts b/vitest.config.ts index 1d1aa83..2eecf16 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,13 +1,13 @@ /// -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\\/.*'], }, });