Skip to content

Commit c5bce4f

Browse files
committed
Merge branch 'develop' into Searchbar_Removal-3301
2 parents 91c3e67 + 847bdeb commit c5bce4f

File tree

464 files changed

+49683
-43769
lines changed

Some content is hidden

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

464 files changed

+49683
-43769
lines changed

.github/workflows/backend.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
uses: actions/checkout@v3
3131
- uses: actions/setup-node@v3
3232
with:
33-
node-version: '18'
33+
node-version: '20.19.4'
3434
- name: Restore npm cache
3535
uses: actions/cache@v3
3636
with:
@@ -71,7 +71,7 @@ jobs:
7171
- uses: actions/checkout@v3
7272
- uses: actions/setup-node@v3
7373
with:
74-
node-version: '18'
74+
node-version: '20.19.4'
7575
- name: Restore npm cache
7676
uses: actions/cache@v3
7777
with:
@@ -94,7 +94,7 @@ jobs:
9494
- uses: actions/checkout@v3
9595
- uses: actions/setup-node@v3
9696
with:
97-
node-version: '18'
97+
node-version: '20.19.4'
9898
- name: Set up Python
9999
uses: actions/setup-python@v4
100100
with:
@@ -157,7 +157,7 @@ jobs:
157157
- uses: actions/checkout@v3
158158
- uses: actions/setup-node@v3
159159
with:
160-
node-version: '18'
160+
node-version: '20.19.4'
161161
- name: Set up Python
162162
uses: actions/setup-python@v4
163163
with:

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v3
2929
- uses: actions/setup-node@v3
3030
with:
31-
node-version: '18'
31+
node-version: '20.19.4'
3232
- name: Restore npm cache
3333
uses: actions/cache@v3
3434
with:

.github/workflows/frontend.yml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: actions/checkout@v3
2727
- uses: actions/setup-node@v3
2828
with:
29-
node-version: '18'
29+
node-version: '20.19.4'
3030
- name: Restore npm cache
3131
uses: actions/cache@v3
3232
with:
@@ -47,7 +47,7 @@ jobs:
4747
- uses: actions/checkout@v3
4848
- uses: actions/setup-node@v3
4949
with:
50-
node-version: '18'
50+
node-version: '20.19.4'
5151
- name: Restore npm cache
5252
uses: actions/cache@v3
5353
with:
@@ -74,7 +74,7 @@ jobs:
7474
- uses: actions/checkout@v3
7575
- uses: actions/setup-node@v3
7676
with:
77-
node-version: '18'
77+
node-version: '20.19.4'
7878
- name: Restore npm cache
7979
uses: actions/cache@v3
8080
with:
@@ -84,13 +84,14 @@ jobs:
8484
- name: Install dependencies
8585
run: npm ci
8686
working-directory: ./frontend
87-
- name: Build Docs
88-
run: |
89-
npm ci
90-
npm run build
91-
working-directory: ./docs
92-
- name: Copy Docs to Frontend
93-
run: cp -R ./docs/public ./frontend/docs-build
87+
# TODO: Reenable docs site CRASM-1070, CRASM-2124
88+
# - name: Build Docs
89+
# run: |
90+
# npm ci
91+
# npm run build
92+
# working-directory: ./docs
93+
# - name: Copy Docs to Frontend
94+
# run: cp -R ./docs/public ./frontend/docs-build
9495
- name: Build Staging
9596
run: |
9697
cp stage-cd.env .env
@@ -118,7 +119,7 @@ jobs:
118119
ls -la .
119120
- uses: actions/setup-node@v3
120121
with:
121-
node-version: '18'
122+
node-version: '20.19.4'
122123
- name: Restore npm cache
123124
uses: actions/cache@v3
124125
with:
@@ -128,15 +129,16 @@ jobs:
128129
- name: Install Frontend Dependencies
129130
run: npm ci
130131
working-directory: ./frontend
131-
- name: Install Docs Dependencies
132-
run: |
133-
npm ci
134-
working-directory: ./docs
135-
- name: Build Docs
136-
run: npm run build
137-
working-directory: ./docs
138-
- name: Copy Docs to Frontend
139-
run: cp -R ./docs/public ./frontend/docs-build
132+
# TODO: Reenable docs site CRASM-1070, CRASM-2124
133+
# - name: Install Docs Dependencies
134+
# run: |
135+
# npm ci
136+
# working-directory: ./docs
137+
# - name: Build Docs
138+
# run: npm run build
139+
# working-directory: ./docs
140+
# - name: Copy Docs to Frontend
141+
# run: cp -R ./docs/public ./frontend/docs-build
140142
- name: Build Integration
141143
run: |
142144
cp integration.env .env

.github/workflows/regression.yml

Lines changed: 158 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,31 @@ on:
1010
- integration
1111
paths:
1212
- frontend/**
13+
- backend/**
14+
- playwright/e2e/**
15+
- integration/**
1316
- .github/workflows/regression.yml
1417
pull_request:
1518
branches:
1619
- develop
1720
- integration
1821
paths:
1922
- frontend/**
20-
- .github/workflows/frontend.yml
23+
- backend/**
24+
- playwright/e2e/**
25+
- integration/**
26+
- .github/workflows/regression.yml
2127

2228
defaults:
2329
run:
2430
working-directory: ./playwright
2531

2632
jobs:
27-
test_staging:
33+
test_staging_frontend:
2834
runs-on: ubuntu-latest
2935
environment: staging
3036
timeout-minutes: 60
31-
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
37+
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || (github.event_name == 'pull_request' && github.base_ref == 'develop' && !startsWith(github.actor, 'dependabot'))
3238
env:
3339
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
3440
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -37,12 +43,20 @@ jobs:
3743
AWS_SECURITY_GROUP: ${{ secrets.AWS_SECURITY_GROUP }}
3844
AUTOMATED_TEST_REPORTS_BUCKET_NAME: cisa-crossfeed-staging-cd-automated-test-reports
3945
PW_XFD_URL: https://staging-cd.crossfeed.cyber.dhs.gov
40-
PW_XFD_USERNAME: ${{ secrets.PW_XFD_USERNAME }}
41-
PW_XFD_PASSWORD: ${{ secrets.PW_XFD_PASSWORD }}
42-
PW_XFD_2FA_SECRET: ${{ secrets.PW_XFD_2FA_SECRET }}
43-
PW_XFD_LOGIN: ${{ secrets.PW_XFD_USERNAME }}
44-
PW_HEADLESS: true
45-
PW_CI: true
46+
PW_GLOBAL_ADMIN_USERNAME: ${{ secrets.PW_GLOBAL_ADMIN_USERNAME }}
47+
PW_GLOBAL_ADMIN_PASSWORD: ${{ secrets.PW_GLOBAL_ADMIN_PASSWORD }}
48+
PW_GLOBAL_ADMIN_2FA_SECRET: ${{ secrets.PW_GLOBAL_ADMIN_2FA_SECRET }}
49+
PW_REGIONAL_ADMIN_USERNAME: ${{ secrets.PW_REGIONAL_ADMIN_USERNAME }}
50+
PW_REGIONAL_ADMIN_PASSWORD: ${{ secrets.PW_REGIONAL_ADMIN_PASSWORD }}
51+
PW_REGIONAL_ADMIN_2FA_SECRET: ${{ secrets.PW_REGIONAL_ADMIN_2FA_SECRET }}
52+
PW_GLOBAL_VIEW_USERNAME: ${{ secrets.PW_GLOBAL_VIEW_USERNAME }}
53+
PW_GLOBAL_VIEW_PASSWORD: ${{ secrets.PW_GLOBAL_VIEW_PASSWORD }}
54+
PW_GLOBAL_VIEW_2FA_SECRET: ${{ secrets.PW_GLOBAL_VIEW_2FA_SECRET }}
55+
PW_STANDARD_USER_USERNAME: ${{ secrets.PW_STANDARD_USER_USERNAME }}
56+
PW_STANDARD_USER_PASSWORD: ${{ secrets.PW_STANDARD_USER_PASSWORD }}
57+
PW_STANDARD_USER_2FA_SECRET: ${{ secrets.PW_STANDARD_USER_2FA_SECRET }}
58+
PW_XFD_2FA_ISSUER: ${{ secrets.PW_XFD_2FA_ISSUER }}
59+
CI: true
4660
ENVIRONMENT: staging
4761
GIT_BRANCH: develop
4862
steps:
@@ -52,12 +66,12 @@ jobs:
5266
run: echo "ENVIRONMENT=staging" >> $GITHUB_ENV
5367

5468
- name: Run Playwright tests
69+
id: run_tests
5570
run: |
5671
chmod +x run_playwright_tests.sh
5772
CLUSTER_NAME=crossfeed-playwright-staging-cd-ecs-cluster \
5873
TASK_DEFINITION=crossfeed-staging-cd-playwright-worker \
5974
./run_playwright_tests.sh
60-
6175
continue-on-error: true
6276

6377
- name: Download test report from S3
@@ -75,7 +89,7 @@ jobs:
7589
- name: Upload Playwright HTML report
7690
uses: actions/upload-artifact@v4
7791
with:
78-
name: playwright-html-report
92+
name: playwright-html-report-staging
7993
path: playwright/playwright-report/html/
8094

8195
- name: Upload Playwright results JSON
@@ -84,12 +98,70 @@ jobs:
8498
name: playwright-results-json
8599
path: playwright/playwright-report/results.json
86100

101+
- name: Fail job if tests failed
102+
if: steps.run_tests.outcome != 'success'
103+
run: exit 1
104+
105+
106+
test_staging_api:
107+
runs-on: ubuntu-latest
108+
environment: staging
109+
timeout-minutes: 20
110+
if: false # TODO: Temporarily skip while issues with API testing are resolved.
111+
defaults:
112+
run:
113+
working-directory: ./integration
114+
env:
115+
BACKEND_DOMAIN: https://api.staging-cd.crossfeed.cyber.dhs.gov
116+
X_API_KEY: ${{ secrets.X_API_KEY }}
117+
steps:
118+
- uses: actions/checkout@v3
119+
120+
- name: Set up Python
121+
uses: actions/setup-python@v5
122+
with:
123+
python-version: '3.11'
124+
125+
- name: Install dependencies
126+
run: |
127+
python -m pip install --upgrade pip
128+
pip install -r requirements.txt
129+
130+
- name: Run Pytest with HTML and JSON reports
131+
id: run_tests
132+
run: |
133+
mkdir -p test-reports
134+
pytest -m integration \
135+
--tb=short \
136+
--maxfail=5 \
137+
--capture=tee-sys \
138+
--html=test-reports/report.html \
139+
--self-contained-html \
140+
--json-report \
141+
--json-report-file=test-reports/report.json
142+
continue-on-error: true
143+
144+
- name: Upload Pytest HTML Report
145+
uses: actions/upload-artifact@v4
146+
with:
147+
name: pytest-html-report
148+
path: integration/test-reports/report.html
149+
150+
- name: Upload Pytest JSON Report
151+
uses: actions/upload-artifact@v4
152+
with:
153+
name: pytest-json-report
154+
path: integration/test-reports/report.json
155+
156+
- name: Fail job if tests failed
157+
if: steps.run_tests.outcome != 'success'
158+
run: exit 1
87159

88160
test_integration:
89161
runs-on: ubuntu-latest
90162
environment: integration
91163
timeout-minutes: 60
92-
if: github.event_name == 'push' && github.ref == 'refs/heads/integration'
164+
if: (github.event_name == 'push' && github.ref == 'refs/heads/integration') || (github.event_name == 'pull_request' && github.base_ref == 'integration' && !startsWith(github.actor, 'dependabot'))
93165
env:
94166
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
95167
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -98,11 +170,20 @@ jobs:
98170
AWS_SECURITY_GROUP: ${{ secrets.AWS_SECURITY_GROUP }}
99171
AUTOMATED_TEST_REPORTS_BUCKET_NAME: cisa-crossfeed-integration-automated-test-reports
100172
PW_XFD_URL: https://integration.crossfeed.cyber.dhs.gov
101-
PW_XFD_USERNAME: ${{ secrets.PW_XFD_USERNAME }}
102-
PW_XFD_PASSWORD: ${{ secrets.PW_XFD_PASSWORD }}
103-
PW_XFD_2FA_SECRET: ${{ secrets.PW_XFD_2FA_SECRET }}
104-
PW_XFD_LOGIN: ${{ secrets.PW_XFD_USERNAME }} # or hardcode if needed
105-
PW_HEADLESS: true
173+
PW_GLOBAL_ADMIN_USERNAME: ${{ secrets.PW_GLOBAL_ADMIN_USERNAME }}
174+
PW_GLOBAL_ADMIN_PASSWORD: ${{ secrets.PW_GLOBAL_ADMIN_PASSWORD }}
175+
PW_GLOBAL_ADMIN_2FA_SECRET: ${{ secrets.PW_GLOBAL_ADMIN_2FA_SECRET }}
176+
PW_REGIONAL_ADMIN_USERNAME: ${{ secrets.PW_REGIONAL_ADMIN_USERNAME }}
177+
PW_REGIONAL_ADMIN_PASSWORD: ${{ secrets.PW_REGIONAL_ADMIN_PASSWORD }}
178+
PW_REGIONAL_ADMIN_2FA_SECRET: ${{ secrets.PW_REGIONAL_ADMIN_2FA_SECRET }}
179+
PW_GLOBAL_VIEW_USERNAME: ${{ secrets.PW_GLOBAL_VIEW_USERNAME }}
180+
PW_GLOBAL_VIEW_PASSWORD: ${{ secrets.PW_GLOBAL_VIEW_PASSWORD }}
181+
PW_GLOBAL_VIEW_2FA_SECRET: ${{ secrets.PW_GLOBAL_VIEW_2FA_SECRET }}
182+
PW_STANDARD_USER_USERNAME: ${{ secrets.PW_STANDARD_USER_USERNAME }}
183+
PW_STANDARD_USER_PASSWORD: ${{ secrets.PW_STANDARD_USER_PASSWORD }}
184+
PW_STANDARD_USER_2FA_SECRET: ${{ secrets.PW_STANDARD_USER_2FA_SECRET }}
185+
PW_XFD_2FA_ISSUER: ${{ secrets.PW_XFD_2FA_ISSUER }}
186+
CI: true
106187
ENVIRONMENT: integration
107188
GIT_BRANCH: integration
108189
steps:
@@ -113,12 +194,12 @@ jobs:
113194

114195
- name: Run Playwright tests
115196
working-directory: ./playwright
197+
id: run_tests
116198
run: |
117199
chmod +x run_playwright_tests.sh
118200
CLUSTER_NAME=crossfeed-playwright-integration-ecs-cluster \
119201
TASK_DEFINITION=crossfeed-integration-playwright-worker \
120202
./run_playwright_tests.sh
121-
122203
continue-on-error: true
123204

124205
- name: Download test report from S3
@@ -136,11 +217,69 @@ jobs:
136217
- name: Upload Playwright HTML report
137218
uses: actions/upload-artifact@v4
138219
with:
139-
name: playwright-html-report
220+
name: playwright-html-report-integration
140221
path: playwright/playwright-report/html/
141222

142223
- name: Upload Playwright results JSON
143224
uses: actions/upload-artifact@v4
144225
with:
145226
name: playwright-results-json
146227
path: playwright/playwright-report/results.json
228+
229+
- name: Fail job if tests failed
230+
if: steps.run_tests.outcome != 'success'
231+
run: exit 1
232+
233+
test_integration_api:
234+
runs-on: ubuntu-latest
235+
environment: integration
236+
timeout-minutes: 20
237+
if: false # TODO: Temporarily skip while issues with API testing are resolved.
238+
defaults:
239+
run:
240+
working-directory: ./integration
241+
env:
242+
BACKEND_DOMAIN: https://api.integration.crossfeed.cyber.dhs.gov
243+
X_API_KEY: ${{ secrets.X_API_KEY }}
244+
steps:
245+
- uses: actions/checkout@v3
246+
247+
- name: Set up Python
248+
uses: actions/setup-python@v5
249+
with:
250+
python-version: '3.11'
251+
252+
- name: Install dependencies
253+
run: |
254+
python -m pip install --upgrade pip
255+
pip install -r requirements.txt
256+
257+
- name: Run Pytest with HTML and JSON reports
258+
id: run_tests
259+
run: |
260+
mkdir -p test-reports
261+
pytest -m integration \
262+
--tb=short \
263+
--maxfail=5 \
264+
--capture=tee-sys \
265+
--html=test-reports/report.html \
266+
--self-contained-html \
267+
--json-report \
268+
--json-report-file=test-reports/report.json
269+
continue-on-error: true
270+
271+
- name: Upload Pytest HTML Report
272+
uses: actions/upload-artifact@v4
273+
with:
274+
name: pytest-html-report
275+
path: integration/test-reports/report.html
276+
277+
- name: Upload Pytest JSON Report
278+
uses: actions/upload-artifact@v4
279+
with:
280+
name: pytest-json-report
281+
path: integration/test-reports/report.json
282+
283+
- name: Fail job if tests failed
284+
if: steps.run_tests.outcome != 'success'
285+
run: exit 1

0 commit comments

Comments
 (0)