Skip to content

Commit

Permalink
chore: setup basic project infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr committed Apr 1, 2024
1 parent 964a81e commit 19b865a
Show file tree
Hide file tree
Showing 27 changed files with 17,699 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- run: npm test
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader
.idea

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
registry = https://registry.npmjs.org
audit=false
auto-install-peers=true
save-exact=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea
.docusaurus
build
LICENSE
package.json
package-lock.json
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 gemini-testing
Copyright (c) 2024 YANDEX LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Testplane Docs Website

Testplane is a modern and robust end-to-end testing framework. It features support for every browser with a single API, testing on real devices, great extensibility and vast visual testing capabilities.

This repository is a home for Testplane docs website.

## Development

### Install dependencies

```shell
nvm use
npm ci
```

### Run local dev server

```shell
npm start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Check your changes

This repository uses TypeScript, Eslint and Prettier.

To run all tests available, run:

```shell
npm test
```

To check types, run:

```shell
npm run typecheck
```

To fix code issues and formatting, run:

```shell
npm run reformat
```
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
Empty file added blog/.empty
Empty file.
7 changes: 7 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# Intro

Welcome to Testplane docs.
133 changes: 133 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
import { themes as prismThemes } from "prism-react-renderer";
import type { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";
import { tailwindPlugin } from "./plugins/tailwind";

const config: Config = {
title: "Testplane Docs",
tagline: "Testplane is a modern end-to-end testing framework.",
favicon: "img/favicon.ico",

// Set the production url of your site here
url: "https://testplane.example.com",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",

// GitHub pages deployment config.
organizationName: "gemini-testing",
projectName: "testplane-docs",

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

i18n: {
defaultLocale: "en",
locales: ["en"],
},

presets: [
[
"classic",
{
docs: {
sidebarPath: "./sidebars.ts",
editUrl: "https://github.com/gemini-testing/testplane-docs/tree/main/docs/",
},
blog: {
showReadingTime: true,
editUrl: "https://github.com/gemini-testing/testplane-docs/tree/main/blog/",
},
theme: {
customCss: "./src/scss/custom.scss",
},
} satisfies Preset.Options,
],
],

themeConfig: {
image: "img/docusaurus-social-card.jpg",
navbar: {
title: "testplane",
logo: {
alt: "Testplane Logo",
src: "img/logo.svg",
},
items: [
{
type: "docSidebar",
sidebarId: "mainSidebar",
position: "left",
label: "Tutorial",
},
{ to: "/blog", label: "Blog", position: "left" },
{
href: "https://github.com/facebook/docusaurus",
label: "GitHub",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Configuration",
to: "/docs/config",
},
{
label: "Events",
to: "/docs/events",
},
{
label: "API reference",
to: "/docs/api",
},
],
},
{
title: "Community",
items: [
{
label: "GitHub",
href: "https://github.com/gemini-testing/testplane",
},
{
label: "Stack Overflow",
href: "https://stackoverflow.com/questions/tagged/testplane",
},
],
},
{
title: "More",
items: [
{
label: "Releases",
to: "https://github.com/gemini-testing/testplane/releases",
},
{
label: "Installation",
href: "/docs/installation",
},
{
label: "First tests with testplane",
href: "/docs/first-tests",
},
],
},
],
copyright: `MIT License © ${new Date().getFullYear()}`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,

plugins: ["docusaurus-plugin-sass", tailwindPlugin],
};

export default config;
45 changes: 45 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import eslint from "@eslint/js";
import geminiTesting from "eslint-config-gemini-testing";
import reactRecommended from "eslint-plugin-react/configs/recommended.js";
import reactJsxRuntime from "eslint-plugin-react/configs/jsx-runtime.js";
import prettier from "eslint-config-prettier";
import tseslint from "typescript-eslint";

export default tseslint.config(
{
ignores: ["node_modules/**", ".docusaurus/**", "babel.config.js", "eslint.config.mjs"],
},
{
files: ["plugins/tailwind.ts"],
languageOptions: {
globals: {
require: true,
},
},
},
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
{
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
settings: {
react: {
version: "detect",
},
},
},
reactRecommended,
reactJsxRuntime,
{
rules: geminiTesting.rules,
},
prettier,
);
Loading

0 comments on commit 19b865a

Please sign in to comment.