Skip to content

Commit 9f8b2a7

Browse files
authored
Merge branch 'develop' into AL-update-rds-strage-type
2 parents 1b58819 + ed4bb53 commit 9f8b2a7

353 files changed

Lines changed: 27183 additions & 16677 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/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ jobs:
4444
- id: setup-env
4545
uses: cisagov/setup-env-github-action@develop
4646
- uses: actions/checkout@v4
47+
- name: Setup Node.js
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: 20
51+
cache: 'npm'
52+
- name: Install root npm dependencies
53+
run: npm ci
4754
- id: setup-python
4855
uses: actions/setup-python@v4
4956
with:

.github/workflows/frontend.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,22 @@ jobs:
5252
uses: actions/cache@v3
5353
with:
5454
path: ~/.npm
55-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
55+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-v2
5656
restore-keys: ${{ runner.os }}-node-
5757
- name: Install dependencies
5858
run: npm ci
5959
working-directory: ./frontend
6060
- name: Build
6161
run: npm run build
6262
working-directory: ./frontend
63-
- name: Test
64-
run: npm run test
63+
- name: Run tests with coverage
64+
run: npx vitest --run --coverage
6565
working-directory: ./frontend
66+
- name: Upload coverage to Coveralls
67+
uses: coverallsapp/github-action@v2
68+
with:
69+
github-token: ${{ secrets.GITHUB_TOKEN }}
70+
path-to-lcov: ./frontend/coverage/lcov.info
6671

6772
deploy_staging:
6873
needs: [lint, test]

.github/workflows/regression.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
runs-on: ubuntu-latest
3535
environment: staging
3636
timeout-minutes: 60
37-
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || (github.event_name == 'pull_request' && github.base_ref == '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'))
38+
if: false # TODO: Temporarily skip while issues with regression testing are resolved.
3839
env:
3940
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
4041
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -56,7 +57,6 @@ jobs:
5657
PW_STANDARD_USER_PASSWORD: ${{ secrets.PW_STANDARD_USER_PASSWORD }}
5758
PW_STANDARD_USER_2FA_SECRET: ${{ secrets.PW_STANDARD_USER_2FA_SECRET }}
5859
PW_XFD_2FA_ISSUER: ${{ secrets.PW_XFD_2FA_ISSUER }}
59-
PW_HEADLESS: true
6060
CI: true
6161
ENVIRONMENT: staging
6262
GIT_BRANCH: develop
@@ -162,7 +162,8 @@ jobs:
162162
runs-on: ubuntu-latest
163163
environment: integration
164164
timeout-minutes: 60
165-
if: (github.event_name == 'push' && github.ref == 'refs/heads/integration') || (github.event_name == 'pull_request' && github.base_ref == 'integration')
165+
# if: (github.event_name == 'push' && github.ref == 'refs/heads/integration') || (github.event_name == 'pull_request' && github.base_ref == 'integration' && !startsWith(github.actor, 'dependabot'))
166+
if: false # TODO: Temporarily skip while issues with regression testing are resolved.
166167
env:
167168
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
168169
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -184,7 +185,6 @@ jobs:
184185
PW_STANDARD_USER_PASSWORD: ${{ secrets.PW_STANDARD_USER_PASSWORD }}
185186
PW_STANDARD_USER_2FA_SECRET: ${{ secrets.PW_STANDARD_USER_2FA_SECRET }}
186187
PW_XFD_2FA_ISSUER: ${{ secrets.PW_XFD_2FA_ISSUER }}
187-
PW_HEADLESS: true
188188
CI: true
189189
ENVIRONMENT: integration
190190
GIT_BRANCH: integration

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ tmp/*
3636
.DS_STORE
3737
*/.DS_STORE
3838
.idea
39+
.eslintcache
3940

4041
npm-debug.log*
4142
yarn-debug.log*
4243
yarn-error.log*
44+
backend/src/xfd_django/vuln_scanning_sync.log
4345

4446
.serverless
4547
.build

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ repos:
4646
- id: yamllint
4747
args:
4848
- --strict
49+
- repo: local
50+
hooks:
51+
- id: eslint
52+
name: ESLint
53+
entry: >
54+
bash -c 'export NVM_DIR="$HOME/.nvm";
55+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use
56+
&& nvm use || true;
57+
cd frontend && npx eslint . --cache'
58+
language: system
59+
files: ^frontend/src/.*\.(js|jsx|ts|tsx)$
4960

5061
# GitHub Actions hooks
5162
- repo: https://github.com/python-jsonschema/check-jsonschema

backend/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ populate-cache:
6060
local-scan-execution:
6161
docker compose exec backend python manage.py local_scan_execution --scan-type=dnstwist --desired-count=1 --org-list="National Science Foundation (NSF) - CISA"
6262

63-
#Create local dev api key. ONLY run this after initial login, since that is when the user(user is tied to api_key) is created
63+
# Create local dev api key. ONLY run this after initial login, since that is when the user(user is tied to api_key) is created
6464
generate-dev-api-key:
6565
docker compose exec backend python manage.py generate_dev_api_key
66+
67+
# Import test users to db
68+
import-test-users:
69+
FILE_BASENAME=$$(basename $(FILE)); \
70+
docker compose cp $(FILE) backend:/tmp/$$FILE_BASENAME; \
71+
docker compose exec backend python manage.py import_test_users /tmp/$$FILE_BASENAME

0 commit comments

Comments
 (0)