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.
- Clone the directory.
- Run the following command from
root
directory.
./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
.
A repository to help users navigate the confusing web of ever emerging technologies.
- Step
1.
and2.
are only run on first setup of the project
- Create
.env
file in Project root directory. - Populate the file with the following line:
POSTGRES_PASSWORD=$secret
. - Change the
$secret
keyword above with our super secret GUID that is not in VCS.
- cd into
/Server
folder. - type
dotnet user-secrets set "ConnectionStrings:SETraining" "$connectionsstring"
- Where
$connectionsstring
is our secret connectionsstring not found in VCS.
- Open terminal.
cd
to the projects root directoryโ ๏ธ IMPORTANT IN ORDER TO LOAD.env
file into docker-composeโ ๏ธ .- Run
docker compose up
. - Optional:
docker compose up --detach
to continue using same terminal
- Run
docker compose down
in terminal or press trash button in Docker Desktop App
- Open query tool in PGAdmin
- Run
DROP SCHEMA public CASCADE; CREATE SCHEMA public;
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 ๐ณ
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
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\""
Find total line count in whole project from bash:
- cd to root directory
- run command
find . -name '*.cs' | xargs wc -l