Giter Site home page Giter Site logo

template-testing's Introduction

About

This is a template repository using the common-lib-vue package to bootstrap a styled form. It includes:

  • A boilerplate vuejs application
  • A dockerfile to serve the web app with nginx
  • A helm chart to run on a kubernetes cluster

Contents

Front End

Overview

This example uses vue 3 with the composition API. It also relies heavily on:

There are two form flows, one small user information form (see views/familyInformation) and a random filler form (views/random). Each main flow has a corresponding set of stores and routes. See the given folders for examples.

Testing

Unit tests for this application are run using vitest and vue-test-utils. They can be run with:

npm run test:unit

Integration testing uses cypress and can be run with:

npm run test:e2e

Default tests exist to demonstrate configuration, e.g adding a store and router mock.

Linting

Linting relies on eslint, and a number of rules are added into the .eslintrc.js specific to vue sfc styling. There are recommended extensions in the vscode folder that will help with using the tools in a vscode editor, as well as some useful workspace settings.

Back End

There is a very basic nginx configuration file that is used to build a single container with a server included. The configuration can be extended if needed, or a separate server could be used. See the Dockerfile for container details.

DevOps

Continuous Integration

A number of github actions are setup to run when integrating code. These include running unit tests, integration tests, linters and type checkers whenever new code is pushed. To run these actions locally, you can add pre-commit hooks with husky install. When merging to the main branch, the package version will be automatically bumped and a tag created to allow for easy releases.

Continuos Deployment

Once a set of changes merged to main are ready to release, create a new release from the github UI to deploy. These actions are setup to deploy to an openshift cluster, but the helm chart is generic enough to run in any kubernetes cluster. To use out of the box, you will need to add two secrets to your github actions:

  • OPENSHIFT_SERVER: the location of your server
  • OPENSHIFT_TOKEN: a token with the ability to create resources, preferably from a longer lived service account.

In addition, the environment variables of the release workflow should be updated to refer to your namespace, and optionally rename images. Newly built images will be hosted with the repositories github packages, to be more easily compared with release notes and available publicly.

template-testing's People

Contributors

jlangy avatar

Watchers

 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.