You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,255 +8,61 @@ This project uses the `Makefile` to build, test and deploy. This will ensure tha
8
8
9
9
## Table of Contents
10
10
11
-
-[Setup](#setup)
11
+
-[Before You Begin](#before-you-begin)
12
12
-[Getting Started](#getting-started)
13
13
-[Deploying](#deploying)
14
14
-[Feature Tests](#feature-tests)
15
15
-[OAuth Tokens for API request](#oauth-tokens-for-api-requests)
16
16
-[Route53 & Hosted Zones](#route53--hosted-zones)
17
17
-[Sandbox](#sandbox)
18
18
-[Releases](#releases)
19
+
-[Reports](#reports)
19
20
20
-
## Setup
21
+
## Before You Begin
21
22
22
-
Before you tackle this guide, there are some more instructions here on the [Developer onboarding guide](https://nhsd-confluence.digital.nhs.uk/pages/viewpage.action?spaceKey=CLP&title=NRLF+-+Developer+Onboarding) in confluence
23
+
Before you start using this repository, you will need to:
23
24
24
-
### 1. Prerequisites
25
+
- Follow the instructions on the [Developer Onboarding Guide](https://nhsd-confluence.digital.nhs.uk/pages/viewpage.action?spaceKey=CLP&title=NRLF+-+Developer+Onboarding) in confluence
26
+
- Install `asdf` using https://asdf-vm.com/guide/getting-started.html.
25
27
26
-
#### 1. ASDF Tool Manager
28
+
Then install all the dependency packages with:
27
29
28
-
For an easy way to make sure your local system matches the requirements needed you can use `asdf tool manager`. This tool fetches the required versions of the libraries needed and sets the directory to use that version instead of your system's default version. To get it up and running,
29
-
30
-
- Install `asdf` using the instructions given here. https://asdf-vm.com/guide/getting-started.html. You can check it installed properly by using the command `asdf --version`
31
-
- Install the dependencies using: `$ make asdf-install`
32
-
- You should be good to go.
33
-
34
-
#### 2. If you prefer to get your local machine running manually the requirements are...
If you are using Linux machine, please skip this section and go to [Linux set up](#3-linux-set-up)
52
-
53
-
This section will provide guidance on how to install the latest version of PowerShell and set up the Windows Subsystem for Linux (WSL) on your Windows machine.
54
-
55
-
PowerShell is a powerful command-line shell and scripting language, while WSL allows you to run a Linux distribution alongside your Windows installation.
56
-
57
-
If you wish to use the official guidance, links are below:
1. Open a web browser and go to the official PowerShell GitHub releases page: https://github.com/PowerShell/PowerShell/releases.
65
-
66
-
2. Scroll down to the "Assets" section and find the latest stable release for your system architecture (usually x64 for 64-bit systems). Download the installer package with the "msi" extension.
67
-
68
-
3. Run the downloaded MSI installer file.
69
-
70
-
4. Follow the on-screen instructions to install PowerShell. Make sure to select the "Add to PATH" option during installation so that you can easily access PowerShell from the command line.
71
-
72
-
5. Once the installation is complete, open a new Command Prompt or PowerShell window to verify that PowerShell is installed. You can do this by typing `powershell` and pressing Enter.
73
-
74
-
#### Step 2: Install Windows Subsystem for Linux (WSL)
75
-
76
-
1. Open PowerShell as an administrator. To do this, search for "PowerShell" in the Windows Start menu, right-click on "Windows PowerShell," and select "Run as administrator."
77
-
78
-
2. Run the following command to enable the WSL feature:
3. After the feature is enabled, restart your computer by running:
83
-
```shell
84
-
Restart-Computer
85
-
```
86
-
4. After your computer restarts, open PowerShell as an administrator again and run the following command to download and install a Linux distribution of your choice (e.g., Ubuntu):
87
-
```shell
88
-
wsl --install
89
-
```
90
-
5. During the installation process, you will be prompted to create a user and set a password for your Linux distribution.
91
-
92
-
6. Once the installation is complete, you can launch your installed Linux distribution by running:
93
-
94
-
```shell
95
-
wsl
96
-
```
97
-
98
-
To run a specific wsl distribution from within PowerShell or Windows Command Prompt without changing your default distribution:
99
-
100
-
use the command: `wsl -d <DistributionName>` , replacing `<DistributionName>` with the name of the distribution you want to use.
101
-
102
-
#### Step 3: Verify Your Installation
103
-
104
-
1. To verify that PowerShell and WSL are correctly installed, open a new PowerShell window (WSL not running) and run the following commands:
105
-
106
-
Check PowerShell version
107
-
108
-
```shell
109
-
$PSVersionTable.PSVersion
110
-
```
111
-
112
-
Check WSL distribution list
113
-
114
-
```shell
115
-
wsl --list
116
-
```
117
-
118
-
These commands should display the PowerShell version and list the installed WSL distributions.
119
-
120
-
### 3. Manually setting up Linux
121
-
122
-
If you're on Linux/WSL and using ASDF, you can skip these steps.
123
-
124
-
For those on a linux/WSL setup these are some helpful instructions:
125
-
126
-
- We recommend that you use the NRLF with VSCode and WSL rather than the Spine VM
127
-
- There is also a plugin for VSCode called `WSL` which will help you avoid some terminal issues when opening projects in WSL
- You will know if you are correctly in the shell when you see the following before your command line prompt `(nrlf-api-py3.11)` (the version may change based on the version of python)
224
-
- If it says (.venv) then you are not using the correct virtual environment
225
-
- As mentioned above you at least need Python 3.9 installed globally to run the project, Poetry will handle the rest
226
-
- The terraform version can be found in the .terraform-version file at the root
227
-
228
34
## Getting Started
229
35
230
36
To build packages:
231
37
232
38
```
233
-
$ make
39
+
make
234
40
```
235
41
236
42
To run the linters over your changes:
237
43
238
44
```
239
-
$ make lint
45
+
make lint
240
46
```
241
47
242
48
To run the unit tests:
243
49
244
50
```
245
-
$ make test
51
+
make test
246
52
```
247
53
248
54
To run the local feature tests:
249
55
250
56
```
251
-
$ make test-features
57
+
make test-features
252
58
```
253
59
254
60
### Troubleshooting
255
61
256
62
To check your environment:
257
63
258
64
```
259
-
$ make check
65
+
make check
260
66
```
261
67
262
68
this will provide a report of the dependencies in your environment and should highlight the things that are not configured correctly or things that are missing.
@@ -268,34 +74,34 @@ For the integration tests, you need to have deployed your infrastructure (using
268
74
To run integration tests:
269
75
270
76
```
271
-
$ make test-integration
77
+
make test-integration
272
78
```
273
79
274
80
To run the Firehose integration tests:
275
81
276
82
```
277
-
$ make test-firehose-integration
83
+
make test-firehose-integration
278
84
```
279
85
280
86
To run all the feature integration tests:
281
87
282
88
```
283
-
$ make test-features-integration
89
+
make test-features-integration
284
90
```
285
91
286
92
To run indivudal feature test scenario(s) using the custom tag :
287
93
288
-
1. Add "@custom_tag" before each 'Scenario' that needs to be run (in each .feature file)
94
+
1. Add `@custom_tag` before each 'Scenario' that needs to be run (in each .feature file)
289
95
2. Run the command below:
290
96
291
97
```
292
-
$ make integration-test-with-custom_tag
98
+
make integration-test-with-custom_tag
293
99
```
294
100
295
101
To run all the feature integration tests and generate an interactive Allure report therafter :
296
102
297
103
```
298
-
$ make test-features-integration-report
104
+
make test-features-integration-report
299
105
```
300
106
301
107
### Smoke testing
@@ -305,19 +111,19 @@ For smoke tests, you need to have deployed your infrastructure (using Terraform)
305
111
Before the first run of the smoke tests, you need to set the required permissions in your deployment. You can do this by running:
306
112
307
113
```
308
-
$ make set-smoketest-perms
114
+
make set-smoketest-perms
309
115
```
310
116
311
117
To run the internal smoke tests against your stack, do this:
312
118
313
119
```
314
-
$ make test-smoke-internal
120
+
make test-smoke-internal
315
121
```
316
122
317
123
To run the smoke tests against the public access endpoints (via APIGEE proxies), do this:
318
124
319
125
```
320
-
$ make test-smoke-public
126
+
make test-smoke-public
321
127
```
322
128
323
129
## API Documentation
@@ -391,7 +197,7 @@ Clients must provide OAuth access tokens when making requests to the NRLF APIs.
391
197
To create an access token for the dev environment, you can do the following:
392
198
393
199
```
394
-
$ make get-access-token
200
+
make get-access-token
395
201
```
396
202
397
203
To create an access token for another environment:
@@ -494,10 +300,10 @@ The process to create a new release is as follows:
494
300
4. Press "Generate release notes" button. This will populate the description with everything that's changed since the last release.
495
301
5. Enter the version of the release into the Release Title field, say `v3.0.1`
496
302
6. Arrange and update the description to accuruately represent the highlights of the release.
497
-
7. Make sure the "Set as the latest release" checkbox it set
303
+
7. Make sure the "Set as a pre-release" checkbox it set
498
304
8. Press the "Publish release" button to complete the release process
499
305
500
-
Once your new release has been created, you can then deploy this release through the NRLF environments using the "Persistent Environment Deploy" Github Action.
306
+
Once your new release has been created, you can then deploy this release through the NRLF environments using the "Persistent Environment Deploy" Github Action. Once your release has been deployed to prod, edit the release and set the "Set as the latest release" checkbox.
501
307
502
308
If the Consumer API has changed, or the documentation for that API has changed, you will also need to release [NRL Consumer API](https://github.com/NHSDigital/nrl-consumer-api).
0 commit comments