Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: setup tests #37

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could remove the overrides block, because you have no rules in the top group anyway.

I would also recommend adding the vitest-eslint config from the main repo:

https://github.com/faker-js/faker/blob/3649b89e928873d26d2791e1bf7f4979af083e9b/.eslintrc.js#L176-L194

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"overrides": [
{
"files": [
"src/**/*.ts"
"src/**/*.ts",
"test/**/*.ts"
],
"extends": [
"eslint:recommended",
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ permissions:
contents: read

jobs:
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 10
name: 'Build & Unit Test'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0

- name: Set node version to 18
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: 18

- name: Install deps
run: npm install

- name: Build
run: npm run build

- name: Install CLI
run: npm install -g

- name: Run Unit Tests
run: npm run test

lint:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
Loading