Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev Support/Fix Make-docs-to-webpage Worfklow #20371

Merged
merged 14 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/make-docs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Make-docs-to-webpage

# Trigger running when a PR is closed
# Trigger whenever changes are made to the master branch
on:
pull_request:
types: [ closed ]
push:
branches:
- master

jobs:
make_docs:
Expand All @@ -13,13 +14,21 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
image: postgres:14.8
env:
POSTGRES_DB: caseflow_certification_test
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports: ["5432:5432"]
redis:
image: redis:2.8.23
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports: ["6379:6379"]

steps:
- name: Debugging info
Expand All @@ -31,7 +40,7 @@ jobs:
env

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

# Since installing a client to Oracle DB is a pain and setting up the VACOLS DB is not necessary, let's skip it.
- name: Remove references to VACOLS Oracle DB
Expand Down Expand Up @@ -111,7 +120,7 @@ jobs:
# and https://github.com/Andrew-Chen-Wang/github-wiki-action/blob/master/entrypoint.sh
# and https://gh.neting.ccmunity/t/how-to-updade-repo-wiki-from-github-actions/121151/7
- name: Checkout branch main-gh-pages
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: main-gh-pages
path: main-gh-pages_checkout
Expand Down Expand Up @@ -140,17 +149,17 @@ jobs:

git add .
if git diff-index --quiet HEAD; then
echo "::set-output name=changes_docs::false"
echo "name=changes_docs::false" >> $GITHUB_OUTPUT

echo "::group::No changes to make_docs"
ls -alR schema/make_docs
echo "::endgroup::"
else
echo "::set-output name=changes_docs::true"
echo "name=changes_docs::true" >> $GITHUB_OUTPUT

echo "::group::Committing changes locally"
git config --local user.email "$WIKI_COMMIT_USER_EMAIL"
git config --local user.name "$WIKI_COMMIT_USER_NAME"
git commit -m "$WIKI_COMMIT_MESSAGE"
git commit -m "$WIKI_COMMIT_MESSAGE" && git push
echo "::endgroup::"
fi
78 changes: 36 additions & 42 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ jobs:
POSTGRES_DB: caseflow_certification_test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran a linter on this file and it fixed some inconsistencies with the whitespace.


ports:
- 5432:5432
- 5432:5432

options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

redis:
image: redis:4.0.10
ports:
- 6379:6379
- 6379:6379

facols_db:
image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/facols:latest
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
ports:
- 1521:1521
- 1521:1521

strategy:
fail-fast: false
Expand All @@ -59,32 +59,32 @@ jobs:
password: ${{ secrets.ECR_PASSWORD }}

env:
DBUS_SESSION_BUS_ADDRESS: /dev/null
RAILS_ENV: test
NODE_ENV: test
BUNDLE_PATH: vendor/bundle
COVERAGE_DIR: /home/circleci/coverage-${{matrix.ci_node_index}} #circleci is the USER
POSTGRES_HOST: postgres
POSTGRES_USER: root
POSTGRES_PASSWORD: password
KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
KNAPSACK_PRO_LOG_LEVEL: info
KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true
WD_INSTALL_DIR: .webdrivers
CI: true
REDIS_URL_CACHE: redis://redis:6379/0/cache/
TEST_VACOLS_HOST: facols_db
DBUS_SESSION_BUS_ADDRESS: /dev/null
RAILS_ENV: test
NODE_ENV: test
BUNDLE_PATH: vendor/bundle
COVERAGE_DIR: /home/circleci/coverage-${{matrix.ci_node_index}} #circleci is the USER
POSTGRES_HOST: postgres
POSTGRES_USER: root
POSTGRES_PASSWORD: password
KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
KNAPSACK_PRO_LOG_LEVEL: info
KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true
WD_INSTALL_DIR: .webdrivers
CI: true
REDIS_URL_CACHE: redis://redis:6379/0/cache/
TEST_VACOLS_HOST: facols_db

steps:
- uses: actions/checkout@v3

# If we don't explicitly set this, the runner doesn't find the path when trying to save the cache
- name: Set yarn cache directory
id: set-yarn-cache-dir
run: mkdir -p ~/.cache/yarn && yarn config set cache-folder ~/.cache/yarn
run: mkdir -p ~/.cache/yarn && yarn config set cache-folder ~/.cache/yarn

- name: restore yarn cache
id: cache-yarn-cache
Expand Down Expand Up @@ -215,8 +215,7 @@ jobs:
# --tty forces Rspec to produce color
# circleci is the USER


# Artifacts --- circleci is the USER
# Artifacts --- circleci is the USER
- run: (cd /home/circleci && tar -zcvf coverage-${{matrix.ci_node_index}}.tar.gz coverage-${{matrix.ci_node_index}})
- uses: actions/upload-artifact@v3
if: success()
Expand Down Expand Up @@ -246,25 +245,23 @@ jobs:
with:
path: ./log/bullet-${{matrix.ci_node_index}}.log



caseflow_jest_job:
# This job will run the jest, change the value below to false if you wish to turn it off.
if: true
runs-on: ubuntu-latest
container:
image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/gaimg-ruby:2.7.3-ga-browsers
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
env:
DBUS_SESSION_BUS_ADDRESS: /dev/null
RAILS_ENV: test
NODE_ENV: test
JEST_DIR: /home/circleci/test-results/jest #circleci is the USER
TEST_REPORTER: jest-junit
JEST_JUNIT_OUTPUT_DIR: /home/circleci/test-results/jest #circleci is the USER
COVERAGE_DIR: /home/circleci/coverage #circleci is the USER
DBUS_SESSION_BUS_ADDRESS: /dev/null
RAILS_ENV: test
NODE_ENV: test
JEST_DIR: /home/circleci/test-results/jest #circleci is the USER
TEST_REPORTER: jest-junit
JEST_JUNIT_OUTPUT_DIR: /home/circleci/test-results/jest #circleci is the USER
COVERAGE_DIR: /home/circleci/coverage #circleci is the USER

steps:
- name: Install Chrome
Expand Down Expand Up @@ -302,23 +299,21 @@ jobs:
with:
path: ./all_logs.log



caseflow_lint_job:
# This job will run the security lint checker, change the value below to false if you wish to turn it off.
if: true
runs-on: ubuntu-latest
container:
image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/gaimg-ruby:2.7.3-ga-browsers
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
username: AWS
password: ${{ secrets.ECR_PASSWORD }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'
fetch-depth: "0"

- name: Install Ruby Dependencies
run: |
Expand All @@ -336,10 +331,9 @@ jobs:
# DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}

- name: Lint
run: ./ci-bin/capture-log "bundle exec rake lint"
run: ./ci-bin/capture-log "bundle exec rake lint"
if: ${{ always() }}

# - name: Security
# run: ./ci-bin/capture-log "bundle exec rake security"
# if: ${{ always() }}

4 changes: 3 additions & 1 deletion lib/tasks/support/jailer_polymorphic_associations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def polymorphic_types_hash
"EndProductUpdate.original_decision_review_type" => [SupplementalClaim, HigherLevelReview],
"JobNote.job_type" => [SupplementalClaim, HigherLevelReview],
"hearing_type" => [Hearing, LegacyHearing],
"assigned_to_type" => [User, Organization]
"assigned_to_type" => [User, Organization],
"CaseflowStuckRecord.stuck_record_type" => [PriorityEndProductSyncQueue],
"VbmsCommunicationPackage.document_mailable_via_pacman_type" => [DecisionDocument, VbmsUploadedDocument]
}.freeze
end

Expand Down
Loading