Giter Club home page Giter Club logo

setraining's Introduction

Run the system for demonstration purposes

The following command is only provided in order to show the system to examiners. It contains a key which should never be in any form of VCS.

  1. Clone the directory.
  2. Run the following command from rootdirectory.
./StartMe.ps1 -Docker -Azure EKA5Ko6vL6oAKFZvGFkPC3oQAJ9vqdCl+19Tudu9aKx5UXDs4eWHKPmF9Ob1h5kZ2XZ1qT6uMMyQsTbEgSkTTQ== 

Make sure to run the command from PowerShell. You may need to change the ExecutionPolicy setting to Unrestricted by typing Set-ExecutionPolicy Unrestricted.


The following was used during development of the system. Disregard it for demonstration purposes.

SETraining ๐Ÿƒ

.NET

A repository to help users navigate the confusing web of ever emerging technologies.


Get started

Note:

  • Step 1. and 2. are only run on first setup of the project

1. Create your local .env for docker-compose

  1. Create .env file in Project root directory.
  2. Populate the file with the following line: POSTGRES_PASSWORD=$secret.
  3. Change the $secret keyword above with our super secret GUID that is not in VCS.

2. Set connections string in user secrets

  1. cd into /Server folder.
  2. type dotnet user-secrets set "ConnectionStrings:SETraining" "$connectionsstring"
  3. Where $connectionsstring is our secret connectionsstring not found in VCS.

3. Run database with docker ๐Ÿณ:

  1. Open terminal.
  2. cd to the projects root directory โš ๏ธ IMPORTANT IN ORDER TO LOAD .env file into docker-compose โš ๏ธ.
  3. Run docker compose up.
  4. Optional: docker compose up --detach to continue using same terminal

4. Stop a database instance ๐Ÿ˜ต:

  1. Run docker compose down in terminal or press trash button in Docker Desktop App

Troubleshooting

Clear the Database and create it again empty (when doing migrations)

  • Open query tool in PGAdmin
  • Run DROP SCHEMA public CASCADE; CREATE SCHEMA public;

The password for PostGreSQL is incorrect

Run the following commands:

  • docker compose down
  • docker system prune
  • docker volume prune

After that you should

  • Restart the containers with step 3. Run database with docker ๐Ÿณ

Testing

Note: only looks at one project for the badge. TODO: need to aggregate test percentages. Make sure to install Coverlet and XUnit in test projects with dotnet CLI

  • dotnet add package xunit --version 2.4.2-pre.12
  • dotnet add package coverlet.msbuild --version 3.1.0

A badge with code coverage is automatically built upon each push to main via coverall.oi

How Do I get Aggregated test results?

  • cd to root directory and run the following command:
  • dotnet test SETraining.sln --logger:trx --results-directory ../TestResults \ "/p:CollectCoverage=true" \ "/p:CoverletOutput=../TestResults/" \ "/p:MergeWith=../TestResults/coverlet.json" \ "/p:CoverletOutputFormat=\"json,cobertura\""

Extra

Find total line count in whole project from bash:

  • cd to root directory
  • run command find . -name '*.cs' | xargs wc -l

Resources ๐Ÿ”—:

setraining's People

Contributors

birkj avatar joac1144 avatar kristian2680 avatar mlflexer avatar nikolajwlarsen avatar

Forkers

joac1144 birkj

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.