Coder Social home page Coder Social logo

carlosrziegler / e2e-tests Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prisma/ecosystem-tests

0.0 0.0 0.0 385.59 MB

πŸ₯ΌπŸ§¬πŸ§ͺπŸ”¬πŸ§«πŸ¦  - Continuously tests Prisma Client with various operating systems, frameworks, platforms, databases and more.

Shell 32.75% TypeScript 38.46% JavaScript 26.96% HTML 0.85% CSS 0.98%

e2e-tests's Introduction

Prisma e2e Tests

CI Status Branch
test dev dev
test latest latest
test patch-dev patch-dev
test integration integration
check-for-update -

This repository continuously tests Prisma Client on various operating systems, frameworks and platforms.

You can check out the latest test runs by checking the "test" workflow results.

How it works

Dependency Updates

Renovate is enabled for this repository for all dependencies except prisma and @prisma/client. Our own script handles upgrading prisma-related dependencies since Renovate is too slow for our use case.

Prisma Updates

If there is a new version, Prismo works tirelessly to commit and push a bump commit, triggering the e2e tests. This is implemented in .github/workflows/check-for-update.yaml using a Github Action cron job. Since the cron job is limited to run each 5 minutes, we just run each cron job for exactly 5 minutes and check for updates each 10 seconds in each run. This check only runs in the default branch master.

Branches and npm channels

The default dev branch of this repository contains the examples with the development version of Prisma CLI and Prisma Client (@dev on npm). These dependencies are kept up to date with a GitHub Action workflow, which updates them every time a new version of Prisma is released.

There are also the branches latest and patch-dev, which mirror the code from dev (synced via a GitHub Action workflow), but they use the respective development channels of Prisma CLI and Prisma Client from npm instead (@latest and @patch-dev, also updated via a GitHub Action workflow). Thanks to the test coverage of all projects, this can point us to incompatibilities early.

e2e Tests

The e2e tests are defined in .github/workflows/test.yaml. Currently, this action tests:

  • Operating Systems: Linux, Mac, Windows (see generic/)
  • Node versions: 12, 14 (see generic/)
  • Frameworks (see frameworks/)
  • Cloud platforms (see platforms/)
  • Bundlers (see bundlers/)
  • Miscellaneous database tools and platform combinations (see databases/)
  • Package managers or specific package manager setups or features (see packagers/)

Checking Test Results

To check the current status of this repository somewhere else, you can use a simple shell script.

Contributing

We use conventional commits (also known as semantic commits) to ensure consistent and descriptive commit messages.

Development Workflow

We develop directly against Github Actions. The workflow looks like this:

  1. Checkout a branch
  2. Make your changes
  3. Push your changes to a PR on GitHub
  4. Inspect the running Checks

How to add or adapt platforms

First add a matrix run entry in .github/workflows/test.yaml under the category the project falls into. For example, if you're adding a new platform into the platforms folder, put a new line named after your project folder in .github/workflows/test.yaml under jobs.platforms.strategy.matrix.platform.

Then in your project, create a file run.sh and use it as an entrypoint to set up your projects. This includes installing dependencies, deploying etc.

Then in your project, create a file test.sh and use it as and entrypoint to run your tests. Please write POSIX-compliant scripts (not bash) and use the the following template for all of your sh files to make sure they exit on errors (-e) and undefined variables (-u):

#!/bin/sh

set -eu

# ...

Note: You need to use yarn as it's used for bumping dependencies; i.e. run yarn install as a first step in your run.sh script.

If you need additional dependencies such as CLIs, you can install them in the optional prepare.sh in a specific folder. It will automatically be picked up to run before the run.sh file does.

Note: It's important to add prisma as a devDependency and @prisma/client as a normal dependency in each project's package.json.

e2e-tests's People

Contributors

dependabot[bot] avatar eemmiillyy avatar honkinggoose avatar janpio avatar jolg42 avatar matthewmueller avatar millsp avatar prisma-bot avatar renovate-bot avatar renovate[bot] avatar schickling avatar steebchen avatar styfle avatar timsuchanek avatar williamluke4 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.