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,67 @@ 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
+
Confirm `asdf` is installed and is working 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
40
## Getting Started
229
41
230
42
To build packages:
231
43
232
44
```
233
-
$ make
45
+
make
234
46
```
235
47
236
48
To run the linters over your changes:
237
49
238
50
```
239
-
$ make lint
51
+
make lint
240
52
```
241
53
242
54
To run the unit tests:
243
55
244
56
```
245
-
$ make test
57
+
make test
246
58
```
247
59
248
60
To run the local feature tests:
249
61
250
62
```
251
-
$ make test-features
63
+
make test-features
252
64
```
253
65
254
66
### Troubleshooting
255
67
256
68
To check your environment:
257
69
258
70
```
259
-
$ make check
71
+
make check
260
72
```
261
73
262
74
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 +80,34 @@ For the integration tests, you need to have deployed your infrastructure (using
268
80
To run integration tests:
269
81
270
82
```
271
-
$ make test-integration
83
+
make test-integration
272
84
```
273
85
274
86
To run the Firehose integration tests:
275
87
276
88
```
277
-
$ make test-firehose-integration
89
+
make test-firehose-integration
278
90
```
279
91
280
92
To run all the feature integration tests:
281
93
282
94
```
283
-
$ make test-features-integration
95
+
make test-features-integration
284
96
```
285
97
286
98
To run indivudal feature test scenario(s) using the custom tag :
287
99
288
-
1. Add "@custom_tag" before each 'Scenario' that needs to be run (in each .feature file)
100
+
1. Add `@custom_tag` before each 'Scenario' that needs to be run (in each .feature file)
289
101
2. Run the command below:
290
102
291
103
```
292
-
$ make integration-test-with-custom_tag
104
+
make integration-test-with-custom_tag
293
105
```
294
106
295
107
To run all the feature integration tests and generate an interactive Allure report therafter :
296
108
297
109
```
298
-
$ make test-features-integration-report
110
+
make test-features-integration-report
299
111
```
300
112
301
113
### Smoke testing
@@ -305,19 +117,19 @@ For smoke tests, you need to have deployed your infrastructure (using Terraform)
305
117
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
118
307
119
```
308
-
$ make set-smoketest-perms
120
+
make set-smoketest-perms
309
121
```
310
122
311
123
To run the internal smoke tests against your stack, do this:
312
124
313
125
```
314
-
$ make test-smoke-internal
126
+
make test-smoke-internal
315
127
```
316
128
317
129
To run the smoke tests against the public access endpoints (via APIGEE proxies), do this:
318
130
319
131
```
320
-
$ make test-smoke-public
132
+
make test-smoke-public
321
133
```
322
134
323
135
## API Documentation
@@ -391,7 +203,7 @@ Clients must provide OAuth access tokens when making requests to the NRLF APIs.
391
203
To create an access token for the dev environment, you can do the following:
392
204
393
205
```
394
-
$ make get-access-token
206
+
make get-access-token
395
207
```
396
208
397
209
To create an access token for another environment:
@@ -494,14 +306,14 @@ The process to create a new release is as follows:
494
306
4. Press "Generate release notes" button. This will populate the description with everything that's changed since the last release.
495
307
5. Enter the version of the release into the Release Title field, say `v3.0.1`
496
308
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
309
+
7. Make sure the "Set as a pre-release" checkbox it set
498
310
8. Press the "Publish release" button to complete the release process
499
311
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.
312
+
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
313
502
-
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].
314
+
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).
503
315
504
-
If the Producer API has changed, or the documentation for that API has changed, you will also need to release (NRL Producer API)[https://github.com/NHSDigital/nrl-producer-api].
316
+
If the Producer API has changed, or the documentation for that API has changed, you will also need to release [NRL Producer API](https://github.com/NHSDigital/nrl-producer-api).
0 commit comments