Skip to content

Commit fc26aa5

Browse files
authored
Merge pull request #6501 from NHSDigital/next
Version 7.7.0
2 parents c2140f3 + 2d1209d commit fc26aa5

162 files changed

Lines changed: 3607 additions & 1073 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5-
61
version: 2
2+
73
updates:
84
- package-ecosystem: bundler
95
directory: /
106
target-branch: next
117
schedule:
128
interval: daily
9+
cooldown:
10+
default-days: 7
11+
1312
- package-ecosystem: github-actions
1413
directory: /
1514
target-branch: next
1615
schedule:
1716
interval: daily
17+
cooldown:
18+
default-days: 7
19+
1820
- package-ecosystem: npm
1921
directory: /
2022
target-branch: next
2123
schedule:
2224
interval: daily
25+
cooldown:
26+
default-days: 7

.github/workflows/continuous-deployment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- type: "section"
5252
text:
5353
type: "mrkdwn"
54-
text: ":rotating_light: *Continuous Deployment failed* :rotating_light:\n\n \
54+
text: ":rotating_light: *Continuous Deployment failed* :rotating_light:\nPull request merged by: <https://github.com/${{ github.actor }}|${{ github.actor }}>\n\n \
5555
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>"
5656
# yamllint enable rule:line-length
5757
- name: Send Slack notification about failed E2E tests
@@ -68,6 +68,6 @@ jobs:
6868
- type: "section"
6969
text:
7070
type: "mrkdwn"
71-
text: ":rotating_light: *E2E tests failed on next* :rotating_light:\n\n \
71+
text: ":rotating_light: *E2E tests failed on next* :rotating_light:\nPull request merged by: <https://github.com/${{ github.actor }}|${{ github.actor }}>\n\n \
7272
<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>"
7373
# yamllint enable rule:line-length

.github/workflows/end-to-end-tests-aws.yml

Lines changed: 377 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Local E2E tests
2+
3+
on: [workflow_call]
4+
5+
jobs:
6+
end-to-end-tests:
7+
runs-on: ubuntu-latest
8+
services:
9+
postgres:
10+
image: postgres:17.2
11+
env:
12+
POSTGRES_PASSWORD: postgres
13+
options: >-
14+
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
15+
ports:
16+
- 5432:5432
17+
env:
18+
MAVIS_TEST_REPO: testing-repository
19+
DATABASE_URL: postgresql://postgres:postgres@localhost:5432
20+
DATABASE_USER: postgres
21+
DATABASE_PASSWORD: postgres
22+
RAILS_ENV: end_to_end
23+
steps:
24+
- name: Checkout base branch
25+
uses: actions/checkout@v6
26+
with:
27+
ref: ${{ github.base_ref }}
28+
- name: Setup Node.js on base branch
29+
uses: actions/setup-node@v6
30+
with:
31+
node-version-file: .tool-versions
32+
cache: yarn
33+
- name: Setup Ruby on base branch
34+
uses: ruby/setup-ruby@v1
35+
with:
36+
bundler-cache: true
37+
- name: Install JS dependencies on base branch
38+
run: yarn install --frozen-lockfile
39+
- name: Setup database
40+
run: bin/rails db:setup
41+
- name: Checkout head branch
42+
uses: actions/checkout@v6
43+
with:
44+
ref: ${{ github.head_ref }}
45+
- name: Setup Node.js on head branch
46+
uses: actions/setup-node@v6
47+
with:
48+
node-version-file: .tool-versions
49+
cache: yarn
50+
- name: Setup Ruby on head branch
51+
uses: ruby/setup-ruby@v1
52+
with:
53+
bundler-cache: true
54+
- name: Install JS dependencies on head branch
55+
run: yarn install --frozen-lockfile
56+
- name: Migrate database
57+
run: bin/rails db:migrate
58+
- name: Install Redis
59+
run: |
60+
sudo apt-get update
61+
sudo apt-get install -y redis-server
62+
- name: Enable feature flags
63+
run: bin/rails feature_flags:enable_for_development
64+
- name: Import from GIAS
65+
run: bin/mavis gias import --input-file=spec/fixtures/dfe-schools.zip
66+
- name: Check if head branch or base branch exists
67+
id: check-branch
68+
run: |
69+
if git ls-remote --exit-code \
70+
--heads https://github.com/NHSDigital/manage-vaccinations-in-schools-testing.git \
71+
"$HEAD_REF" > /dev/null 2>&1; then
72+
echo "test_branch=$HEAD_REF" >> "$GITHUB_OUTPUT"
73+
elif git ls-remote --exit-code \
74+
--heads https://github.com/NHSDigital/manage-vaccinations-in-schools-testing.git \
75+
"$BASE_REF" > /dev/null 2>&1; then
76+
echo "test_branch=$BASE_REF" >> "$GITHUB_OUTPUT"
77+
else
78+
echo "test_branch=main" >> "$GITHUB_OUTPUT"
79+
fi
80+
env:
81+
HEAD_REF: ${{ github.head_ref }}
82+
BASE_REF: ${{ github.base_ref }}
83+
- name: Clone testing repository
84+
uses: actions/checkout@v6
85+
with:
86+
repository: NHSDigital/manage-vaccinations-in-schools-testing
87+
ref: ${{ steps.check-branch.outputs.test_branch }}
88+
path: ${{ env.MAVIS_TEST_REPO }}
89+
- name: Setup testing repository environment file
90+
run: mv ${{ env.MAVIS_TEST_REPO }}/.env.generic ${{ env.MAVIS_TEST_REPO }}/.env
91+
- name: Setup uv
92+
uses: astral-sh/setup-uv@v7
93+
- name: Setup Playwright
94+
working-directory: ${{ env.MAVIS_TEST_REPO }}
95+
run: |
96+
uv run playwright install --with-deps chromium
97+
- name: Run tests
98+
run: bin/e2e -n 2 --reruns 2

0 commit comments

Comments
 (0)