Skip to content

Commit

Permalink
Merge pull request #5337 from dfe-analytical-services/dev
Browse files Browse the repository at this point in the history
Merge Dev into Master
  • Loading branch information
N-moh authored Oct 15, 2024
2 parents d19b749 + 9eda67c commit 8e23989
Show file tree
Hide file tree
Showing 234 changed files with 13,884 additions and 4,670 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/validate-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Create pull request
id: cpr
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
token: ${{ env.GH_TOKEN }}
commit-message: 'chore(tests): update test snapshots'
Expand All @@ -84,7 +84,7 @@ jobs:
token: ${{ env.GH_TOKEN }}

- name: Slack Notification
uses: slackapi/slack-github-action@v1.26.0
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
Expand Down
7 changes: 1 addition & 6 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

if [ -d "./node_modules/.bin/lint-staged" ]; then
./node_modules/.bin/lint-staged
fi
lint-staged
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,30 @@ cd src/GovUk.Education.ExploreEducationStatistics.Public.Data.Api
dotnet ef migrations add EES1234_MigrationNameHere --context PublicDataDbContext --project ../GovUk.Education.ExploreEducationStatistics.Public.Data.Model -v
```

### Running backend tests

The backend c# projects have a number of unit and integration tests. From the project root, run:

```sh
cd src
dotnet clean
dotnet test
```

Note that the `clean` is necessary due to an issue with [AspectInjector](https://github.com/pamidur/aspect-injector)
whereby compilation of code over already-compiled code will add AOP execution code on top of existing AOP execution
code, leading to AOP code being invoked multiple times rather than just once. This would result in test failures, as we
assert that AOP code is executed only once.

#### Configuring Linux for running unit and integration tests

Due to the resource requirements of the integration tests, Linux users need to ensure that the system running the tests
is capable of doing so. The `max_user_watches` setting must be set to a high enough limit, for example by running:

```sh
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
```

### Resetting Azurite

During development you might want to reset your Azurite instance to clear out all data from
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines-ui-tests.dfe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
displayName: Public UI tests
inputs:
scriptPath: tests/robot-tests/scripts/run_tests_pipeline.py
arguments: --admin-pass "test" --analyst-pass "test" --expiredinvite-pass "test" --noinvite-pass "test" --pendinginvite-pass "test" --env "dev" --file "tests/general_public/" --processes 4 --rerun-attempts 3
arguments: --admin-pass "test" --analyst-pass "test" --expiredinvite-pass "test" --noinvite-pass "test" --pendinginvite-pass "test" --env "dev" --file "tests/general_public" --processes 4 --rerun-attempts 3
workingDirectory: tests/robot-tests
env:
SLACK_APP_TOKEN: $(ees-alerts-slackapptoken)
Expand Down
3 changes: 3 additions & 0 deletions azure-pipelines.dfe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
default:
- master
- dev
- test

variables:
BuildConfiguration: 'Release'
Expand All @@ -18,12 +19,14 @@ trigger:
include:
- master
- dev
- test
paths:
exclude:
- infrastructure/
pr:
- master
- dev
- test

jobs:
- job: 'Backend'
Expand Down
1 change: 1 addition & 0 deletions infrastructure/infrastructure-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ trigger:
include:
- master
- dev
- test
paths:
include:
- infrastructure/*
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"execa": "^8.0.1",
"husky": "^8.0.3",
"lint-staged": "^13.2.3",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"lodash": "^4.17.21",
"prettier": "^3.0.1",
"signal-exit": "^4.1.0",
Expand All @@ -46,7 +46,7 @@
"typescript": "^5.5.4"
},
"scripts": {
"prepare": "husky install",
"prepare": "husky",
"preinstall": "pnpm check:node",
"clean": "pnpm -r --parallel exec rm -rf node_modules && rm -rf node_modules && rm -rf src/explore-education-statistics-frontend/.next",
"check:node": "check-node-version --package",
Expand Down
Loading

0 comments on commit 8e23989

Please sign in to comment.