Use this repository to quickly create an SSCCE for your issue! This way your issue will be much easier to investigate.
By using this repository, you won't have to worry about setting up any database. You don't need to install anything, you don't need docker, you don't need to spend time configuring a development environment to create your SSCCE. Everything is already set up for you.
You just write your code and it works, directly from GitHub!
Go to the src/sscce.js file in this repository, and click the edit button (a pencil).
Since this is not your repository, a fork will be automatically created for you to perform your edit. You will see this message:
Just create your SSCCE in that file, and commit it to your fork:
This step is extremely easy. Now that you have commited your SSCCE to your fork, just open a Pull Request (don't worry, I won't accept it!):
The idea here is that once you open the pull request, Travis CI and AppVeyor will automatically execute it for you, since I have them configured in the main repository. I won't accept the pull request, since the goal is just to have your code executed.
These are Continuous Integration services, free to use on open source projects, that are used in Sequelize itself to run all the automated tests, such as here and here. They will run your SSCCE and show show a green checkmarks (or a red X) next to the commit:
Just add more commits on top of it, in your fork, and your PR will be updated automatically, and the SSCCE will be executed again.
Why not? This repository was created exactly for this purpose. Please feel free to use it.
However, if you prefer, you can also enable Travis CI and AppVeyor in your own fork, so you can have them execute your code without having to open the PR.
By default, your SSCCE will be executed on all dialects. If you only want a specific dialect, you can check the process.env.DIALECT
variable. For example, if you only want to run your SSCCE for postgres, you can add the following at the beginning of your SSCCE code:
if (process.env.DIALECT !== "postgres") return;
// The rest of the SSCCE goes here...
If your issue needs a postgres extension such as uuid-ossp
, you should enable it at the beginning of your SSCCE:
await sequelize.query(`CREATE EXTENSION IF NOT EXISTS "uuid-ossp"`);
// The rest of the SSCCE goes here...
Just use the src/sscce.ts file instead of the src/sscce.js file. That's it, super easy. Also works directly from GitHub.
This repository also comes with built-in support for running your SSCCE locally on SQLite:
- Clone this repository
npm install
- Edit the
src/sscce.js
as you like npm start
The above will run your SSCCE locally on SQLite, with no need for any other extra setup.
There is no local support for other dialects; this is harder because requires setting up local databases. It is doable, but out of scope for this repository. Learn more.
Do the same as above, except:
- Edit the
src/sscce.ts
file instead of thesrc/sscce.js
file - Run
npm run ts
instead ofnpm start
MIT (c) Pedro Augusto de Paula Barbosa