Skip to content

Commit

Permalink
Merge branch 'master' into 21a-api-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
raudabaugh committed Dec 12, 2024
2 parents 9ee639c + 2e7ba77 commit 9cca77b
Show file tree
Hide file tree
Showing 684 changed files with 47,048 additions and 9,367 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

"features": {
"ghcr.io/devcontainers-contrib/features/ruby-asdf:0": {
"version": "3.3.3"
"version": "3.3.6"
},
"ghcr.io/robbert229/devcontainer-features/postgresql-client:1": {
"version": "15"
Expand Down
38 changes: 23 additions & 15 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions .github/workflows/audit_service_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Remove Review label
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ready-for-backend-review')
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
ready-for-backend-review
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/backend-pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request_review:
types: [submitted]
workflow_run:
workflows:
workflows:
- "Code Checks"
types: [completed]
jobs:
Expand Down Expand Up @@ -34,14 +34,14 @@ jobs:
elif ${{ toJSON(github.event.workflow_run.pull_requests) != '[]' }}; then
PR_NUMBER="${{ github.event.workflow_run.pull_requests[0].number }}"
echo "pr_number=${PR_NUMBER}" >> $GITHUB_OUTPUT
# Fetch PR details from GitHub API
PR_INFO=$(gh api /repos/${{ github.repository }}/pulls/${PR_NUMBER} --jq '{
draft: .draft,
labels: [.labels[].name],
requested_teams: [.requested_teams[].slug]
}')
# Extract and store individual fields
echo "pr_draft=$(echo "$PR_INFO" | jq -r '.draft')" >> $GITHUB_OUTPUT
echo "pr_labels=$(echo "$PR_INFO" | jq -c '.labels')" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -104,6 +104,7 @@ jobs:
id: audit_pr_labels
run: |
if \
${{ contains(env.pr_labels, 'audit-service-failure') }} || \
${{ contains(env.pr_labels, 'code-health-failure') }} || \
${{ contains(env.pr_labels, 'codeowners-addition-failure') }} || \
${{ contains(env.pr_labels, 'codeowners-delete-failure') }} || \
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/check_codeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ jobs:
with:
fetch-depth: 2

- name: Remove Review label
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ready-for-backend-review')
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
ready-for-backend-review
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
Expand Down Expand Up @@ -80,14 +72,6 @@ jobs:
with:
fetch-depth: 2

- name: Remove Review label
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ready-for-backend-review')
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
ready-for-backend-review
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
Expand Down
117 changes: 37 additions & 80 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Remove Review label
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ready-for-backend-review')
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
ready-for-backend-review
- name: Run bundle-audit (checks gems for CVE issues)
run: bundle exec bundle-audit check --update --ignore CVE-2024-27456

Expand All @@ -43,16 +35,14 @@ jobs:
uses: actions-ecosystem/action-add-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
lint-failure
labels: lint-failure

- name: Remove Lint Failure label
if: success() && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'lint-failure')
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
lint-failure
labels: lint-failure
tests:
name: Test
env:
Expand All @@ -64,6 +54,8 @@ jobs:
COMPOSE_DOCKER_CLI_BUILD: 1
permissions: write-all
runs-on: ubuntu-32-cores-latest
outputs:
status: ${{ steps.test-status.outputs.status }}
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -92,22 +84,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Remove Review label
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ready-for-backend-review')
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
ready-for-backend-review
- name: Remove Test Passing label
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test-passing')
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
test-passing
- name: Build Docker Image
uses: docker/build-push-action@v6
env:
Expand All @@ -126,19 +102,29 @@ jobs:
- name: Setup Database
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
timeout_minutes: 20
timeout_minutes: 10
retry_wait_seconds: 3 # Seconds
max_attempts: 3
command: |
docker compose -f docker-compose.test.yml run web bash \
-c "CI=true RAILS_ENV=test DISABLE_BOOTSNAP=true bundle exec parallel_test -n 24 -e 'bin/rails db:reset'"
- name: Run Specs
timeout-minutes: 20
timeout-minutes: 15
run: |
docker compose -f docker-compose.test.yml run web bash \
-c "CI=true DISABLE_BOOTSNAP=true bundle exec parallel_rspec spec/ modules/ -n 24 -o '--color --tty'"
- name: Set Test Status
id: test-status
if: always()
run: |
if [ "${{ job.status }}" = "success" ]; then
echo "status=success" >> $GITHUB_OUTPUT
else
echo "status=failure" >> $GITHUB_OUTPUT
fi
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
if: always()
Expand All @@ -155,74 +141,45 @@ jobs:
path: log/*.xml
if-no-files-found: ignore

- name: Add Test Failure label
if: failure() && github.event_name == 'pull_request'
uses: actions-ecosystem/action-add-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
test-failure
update_labels:
name: Update Test Status Labels
needs: tests
if: always() && github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Remove Test Failure label
if: success() && github.event_name == 'pull_request'
if: needs.tests.outputs.status == 'success' && contains(github.event.pull_request.labels.*.name, 'test-failure')
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
test-failure
labels: test-failure

- name: Add Test Passing label
if: success() && github.event_name == 'pull_request'
uses: actions-ecosystem/action-add-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
test-passing
- name: Add omit-backend-approval label
if: |
github.event_name == 'pull_request' && github.event.pull_request.draft == false &&
(
contains(toJSON(github.event.pull_request.requested_teams.*.name), 'mobile') ||
contains(toJSON(github.event.pull_request.requested_teams.*.name), 'lighthouse') ||
contains(toJSON(github.event.pull_request.requested_teams.*.name), 'identity')
)
- name: Add Test Failure label
if: needs.tests.outputs.status == 'failure'
uses: actions-ecosystem/action-add-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
omit-backend-approval
labels: test-failure

- name: Add require-backend-approval label
uses: actions-ecosystem/action-add-labels@v1
if: |
github.event_name == 'pull_request' && github.event.pull_request.draft == false &&
!contains(toJSON(github.event.pull_request.requested_teams.*.name), 'mobile') &&
!contains(toJSON(github.event.pull_request.requested_teams.*.name), 'lighthouse') &&
!contains(toJSON(github.event.pull_request.requested_teams.*.name), 'identity')
- name: Remove Test Passing label
if: needs.tests.outputs.status == 'failure' && contains(github.event.pull_request.labels.*.name, 'test-passing')
uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ github.event.pull_request.number }}
labels: |
require-backend-approval
labels: test-passing

- name: Add Review label
- name: Add Test Passing label
if: needs.tests.outputs.status == 'success'
uses: actions-ecosystem/action-add-labels@v1
if: |
github.event_name == 'pull_request' && success() && github.event.pull_request.draft == false &&
!contains(github.event.pull_request.labels.*.name, 'code-health-failure') &&
!contains(github.event.pull_request.labels.*.name, 'codeowners-addition-failure') &&
!contains(github.event.pull_request.labels.*.name, 'codeowners-delete-failure') &&
!contains(github.event.pull_request.labels.*.name, 'lint-failure') &&
!contains(github.event.pull_request.labels.*.name, 'test-failure')
with:
number: ${{ github.event.pull_request.number }}
labels: |
ready-for-backend-review
labels: test-passing

publish_results:
name: Publish Test Results and Coverage
if: always()
needs: [tests]
needs: tests
permissions: write-all
runs-on: ubuntu-16-cores-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/income-limits-data-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
income_limits_data_sync:
runs-on: self-hosted
container:
image: public.ecr.aws/docker/library/ruby:3.3.3-bullseye
image: public.ecr.aws/docker/library/ruby:3.3.6-bullseye
env:
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt
Expand Down
Loading

0 comments on commit 9cca77b

Please sign in to comment.