Skip to content

Latest commit

 

History

History
102 lines (63 loc) · 2.51 KB

CONTRIBUTING.md

File metadata and controls

102 lines (63 loc) · 2.51 KB

Contributing to Simulai

Thank you for your interest in Simulai!

Prelude

Simulai is written with the following frameworks and tools:

We strongly encourage contributors to be familiarized with these tools.

Initial Setup

Installing Dependencies

Before you can start helping with Simulai, you will want to install and configure the following dependencies on your machine:

Forking Simulai on GitHub

To contribute code to Simulai, you need to fork the repository.

Setup Simulai on Your Computer

Clone the Repository

To build Simulai, you clone your fork of the repository:

  1. Clone your GitHub forked repository:

    git clone https://github.com/<github_username>/simulai.git
  2. Go to the Simulai directory:

    cd simulai

Installing Dependencies

Install npm dependencies:

```sh
npm i
```

Start a Development Server

  1. Start development server

    npm run dev
  2. To access the local server, enter the following URL into your web browser:

    http://localhost:5173/

Writing Tests

  1. Run tests

First, familiarize yourself with the libraries we are using for tests.

Simulai uses Vitest for unit and component tests, as well as Playwright for e2e tests.

After cloning the repository to your local environment and running npm i, you can run tests with the following:

npm run test:unit
npm run test:e2e

The same tests will run for any PR requested to the main branch, and all tests should pass before any PR is merged.

  1. Write tests

All new features should be accompanied by at least one test for the new feature.

All bug fixes should be accompanied by a test that replicates the bug.

When writing a test, check that it fails correctly before checking that it passes.

Submit Your Contribution!

After you've made the improvements, you can open a pull request and a member of the Simulai team (well either SK or Alfred for now!) will work with you on the PR!