From 82e5ea50c531d95639a652776cf70b21a8ef2762 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 11:44:26 +0100 Subject: [PATCH 01/88] initial github workflow commit --- .github/workflows/deploy.yml | 381 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 73 +++++++ 2 files changed, 454 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000000..6677289b41 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,381 @@ +name: Deploy Workflow + +on: + workflow_dispatch: + workflow_call: + +env: + PREFIX: "ct-staff" + SHA: ${{ github.event.pull_request.head.sha || github.sha }} + +concurrency: + group: deploy-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Assume role in Cloud Platform + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }} + aws-region: ${{ vars.ECR_REGION }} + + - name: Login to container repository + uses: aws-actions/amazon-ecr-login@v2 + id: login-ecr + + - name: Store current date + run: echo "BUILD_DATE=$(date +%Y-%m-%dT%H:%M:%S%z)" >> $GITHUB_ENV + + - name: Store build tag + id: vars + run: | + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + short_sha=$(git rev-parse --short $SHA) + build_tag=$PREFIX-$branch-$short_sha + echo "build_tag=$build_tag" >> $GITHUB_OUTPUT + + - name: Build + run: | + docker build \ + --build-arg APP_BUILD_DATE=${{ env.BUILD_DATE }} \ + --build-arg APP_BUILD_TAG=${{ steps.vars.outputs.build_tag }} \ + --build-arg APP_GIT_COMMIT=$SHA \ + -t ${{ vars.ECR_URL }}:$SHA . + + - name: Push to ECR + run: docker push ${{ vars.ECR_URL }}:$SHA + + + deploy-development: + runs-on: ubuntu-latest + needs: build + environment: development + + permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + + env: + KUBE_NAMESPACE: ${{ secrets.KUBE_NAMESPACE }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Assume role in Cloud Platform + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }} + aws-region: ${{ vars.ECR_REGION }} + + - name: Login to container repository + uses: aws-actions/amazon-ecr-login@v2 + id: login-ec + + - name: Store build tag + id: vars + run: | + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + short_sha=$(git rev-parse --short $SHA) + build_tag=$PREFIX-$branch-$short_sha + echo "build_tag=$build_tag" >> $GITHUB_OUTPUT + + - name: Tag build and push to ECR + run: | + docker pull ${{ vars.ECR_URL }}:$SHA + docker tag ${{ vars.ECR_URL }}:$SHA ${{ vars.ECR_URL }}:development.latest + docker push ${{ vars.ECR_URL }}:development.latest + + - name: Authenticate to the cluster + env: + KUBE_CERT: ${{ secrets.KUBE_CERT }} + KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }} + KUBE_CLUSTER: ${{ secrets.KUBE_CLUSTER }} + run: | + echo "${KUBE_CERT}" > ca.crt + kubectl config set-cluster ${KUBE_CLUSTER} --certificate-authority=./ca.crt --server=https://${KUBE_CLUSTER} + kubectl config set-credentials deploy-user --token=${KUBE_TOKEN} + kubectl config set-context ${KUBE_CLUSTER} --cluster=${KUBE_CLUSTER} --user=deploy-user --namespace=${KUBE_NAMESPACE} + kubectl config use-context ${KUBE_CLUSTER} + + - name: Rollout restart deployment + run: | + kubectl set image -n ${KUBE_NAMESPACE} \ + deployment/parliamentary-questions \ + parliamentary-questions-rails-app="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + deployment/parliamentary-questions-sidekiq \ + parliamentary-questions-rails-jobs="${{ vars.ECR_URL }}:$SHA" + + - name: Send deploy notification to product Slack channel + uses: slackapi/slack-github-action@v1.25.0 + with: + payload: | + { + "attachments": [ + { + "color": "#1d990c", + "text": "${{ github.actor }} deployed *${{ steps.vars.outputs.build_tag }}* to *Development*", + "fields": [ + { + "title": "Project", + "value": "Parliamentary Questions", + "short": true + } + ], + "actions": [ + { + "text": "Visit Job", + "type": "button", + "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + } + ] + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + + deploy-staging: + runs-on: ubuntu-latest + needs: build + environment: staging + + permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + + env: + KUBE_NAMESPACE: ${{ secrets.KUBE_NAMESPACE }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Assume role in Cloud Platform + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }} + aws-region: ${{ vars.ECR_REGION }} + + - name: Login to container repository + uses: aws-actions/amazon-ecr-login@v2 + id: login-ec + + - name: Store build tag + id: vars + run: | + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + short_sha=$(git rev-parse --short $SHA) + build_tag=$PREFIX-$branch-$short_sha + echo "build_tag=$build_tag" >> $GITHUB_OUTPUT + + - name: Tag build and push to ECR + run: | + docker pull ${{ vars.ECR_URL }}:$SHA + docker tag ${{ vars.ECR_URL }}:$SHA ${{ vars.ECR_URL }}:staging.latest + docker push ${{ vars.ECR_URL }}:staging.latest + + - name: Authenticate to the cluster + env: + KUBE_CERT: ${{ secrets.KUBE_CERT }} + KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }} + KUBE_CLUSTER: ${{ secrets.KUBE_CLUSTER }} + run: | + echo "${KUBE_CERT}" > ca.crt + kubectl config set-cluster ${KUBE_CLUSTER} --certificate-authority=./ca.crt --server=https://${KUBE_CLUSTER} + kubectl config set-credentials deploy-user --token=${KUBE_TOKEN} + kubectl config set-context ${KUBE_CLUSTER} --cluster=${KUBE_CLUSTER} --user=deploy-user --namespace=${KUBE_NAMESPACE} + kubectl config use-context ${KUBE_CLUSTER} + + - name: Rollout restart deployment + run: | + kubectl set image -n ${KUBE_NAMESPACE} \ + deployment/parliamentary-questions \ + parliamentary-questions-rails-app="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + deployment/parliamentary-questions-sidekiq \ + parliamentary-questions-rails-jobs="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + jobs/nightly-import \ + nightly-import="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + jobs/trim-database \ + trim-database="${{ vars.ECR_URL }}:$SHA" + + - name: Send deploy notification to product Slack channel + uses: slackapi/slack-github-action@v1.25.0 + with: + payload: | + { + "attachments": [ + { + "color": "#1d990c", + "text": "${{ github.actor }} deployed *${{ steps.vars.outputs.build_tag }}* to *Staging*", + "fields": [ + { + "title": "Project", + "value": "Parliamentary Questions", + "short": true + } + ], + "actions": [ + { + "text": "Visit Job", + "type": "button", + "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + } + ] + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + + deploy-production: + runs-on: ubuntu-latest + needs: build + if: ${{ github.ref == 'refs/heads/main' }} + environment: production + + permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + + env: + KUBE_NAMESPACE: ${{ secrets.KUBE_NAMESPACE }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Assume role in Cloud Platform + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }} + aws-region: ${{ vars.ECR_REGION }} + + - name: Login to container repository + uses: aws-actions/amazon-ecr-login@v2 + id: login-ec + + - name: Store build tag + id: vars + run: | + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + short_sha=$(git rev-parse --short $SHA) + build_tag=$PREFIX-$branch-$short_sha + echo "build_tag=$build_tag" >> $GITHUB_OUTPUT + + - name: Tag build and push to ECR + run: | + docker pull ${{ vars.ECR_URL }}:$SHA + docker tag ${{ vars.ECR_URL }}:$SHA ${{ vars.ECR_URL }}:production.latest + docker push ${{ vars.ECR_URL }}:production.latest + + - name: Authenticate to the cluster + env: + KUBE_CERT: ${{ secrets.KUBE_CERT }} + KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }} + KUBE_CLUSTER: ${{ secrets.KUBE_CLUSTER }} + run: | + echo "${KUBE_CERT}" > ca.crt + kubectl config set-cluster ${KUBE_CLUSTER} --certificate-authority=./ca.crt --server=https://${KUBE_CLUSTER} + kubectl config set-credentials deploy-user --token=${KUBE_TOKEN} + kubectl config set-context ${KUBE_CLUSTER} --cluster=${KUBE_CLUSTER} --user=deploy-user --namespace=${KUBE_NAMESPACE} + kubectl config use-context ${KUBE_CLUSTER} + + - name: Rollout restart deployment + run: | + kubectl set image -n ${KUBE_NAMESPACE} \ + deployment/parliamentary-questions \ + parliamentary-questions-rails-app="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + deployment/parliamentary-questions-sidekiq \ + parliamentary-questions-rails-jobs="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + jobs/nightly-import \ + nightly-import="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + jobs/early-bird-dispatch \ + early-bird-dispatch="${{ vars.ECR_URL }}:$SHA" + + - name: Send deploy notification to product Slack channel + uses: slackapi/slack-github-action@v1.25.0 + with: + payload: | + { + "attachments": [ + { + "color": "#1d990c", + "text": "${{ github.actor }} deployed *${{ steps.vars.outputs.build_tag }}* to *Production*", + "fields": [ + { + "title": "Project", + "value": "Parliamentary Questions", + "short": true + } + ], + "actions": [ + { + "text": "Visit Job", + "type": "button", + "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + } + ] + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + + - name: Send deploy notification to cdpt production Slack channel + uses: slackapi/slack-github-action@v1.25.0 + with: + payload: | + { + "attachments": [ + { + "color": "#1d990c", + "text": "${{ github.actor }} deployed *${{ steps.vars.outputs.build_tag }}* to *Production*", + "fields": [ + { + "title": "Project", + "value": "Parliamentary Questions", + "short": true + } + ], + "actions": [ + { + "text": "Visit Job", + "type": "button", + "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + } + ] + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.PROD_SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..106a6bc151 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,73 @@ +name: Test Workflow +on: + pull_request: + push: + branches: + - main + +concurrency: + group: test-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + permissions: + checks: write + + env: + RAILS_ENV: test + DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" + + services: + postgres: + image: postgres:12-alpine + env: + POSTGRES_DB: correspondence_platform_test + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - 5432:5432 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Ruby and install gems + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 14.17.5 + + - name: Precompile assets + run: bin/rails assets:precompile + + - name: Setup test database + run: bin/rails db:setup + + - name: Lint Ruby files + run: bundle exec rubocop + + - name: Security audit application code + run: bundle exec brakeman -q + + - name: Run tests + run: bundle exec rspec + + - name: Code coverage + uses: joshmfrankel/simplecov-check-action@main + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + minimum_suite_coverage: 92 + minimum_file_coverage: 100 + + build-and-deploy: + if: ${{ github.ref == 'refs/heads/main' }} + needs: test + uses: ./.github/workflows/deploy.yml + secrets: inherit From 5b93b8e526ee4c8847adb6ec7d18339fcb96f759 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 13:14:09 +0100 Subject: [PATCH 02/88] update deploy config --- .github/workflows/deploy.yml | 77 +++++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6677289b41..d9c77ff504 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -112,12 +112,20 @@ jobs: - name: Rollout restart deployment run: | kubectl set image -n ${KUBE_NAMESPACE} \ - deployment/parliamentary-questions \ - parliamentary-questions-rails-app="${{ vars.ECR_URL }}:$SHA" - + deployment/track-a-query \ + webapp="${{ vars.ECR_URL }}:$SHA" \ + quickjobs="${{ vars.ECR_URL }}:$SHA" \ + uploads="${{ vars.ECR_URL }}:$SHA" \ + pending-migrations="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + deployment/track-a-query-jobs \ + jobs="${{ vars.ECR_URL }}:$SHA" \ + pending-migrations="${{ vars.ECR_URL }}:$SHA" + kubectl set image -n ${KUBE_NAMESPACE} \ - deployment/parliamentary-questions-sidekiq \ - parliamentary-questions-rails-jobs="${{ vars.ECR_URL }}:$SHA" + cronjobs/close-expired-rejected-offender-sars \ + jobs="${{ vars.ECR_URL }}:$SHA" - name: Send deploy notification to product Slack channel uses: slackapi/slack-github-action@v1.25.0 @@ -131,7 +139,7 @@ jobs: "fields": [ { "title": "Project", - "value": "Parliamentary Questions", + "value": "Correspondence Tool Staff", "short": true } ], @@ -204,20 +212,20 @@ jobs: - name: Rollout restart deployment run: | kubectl set image -n ${KUBE_NAMESPACE} \ - deployment/parliamentary-questions \ - parliamentary-questions-rails-app="${{ vars.ECR_URL }}:$SHA" - + deployment/track-a-query \ + webapp="${{ vars.ECR_URL }}:$SHA" \ + quickjobs="${{ vars.ECR_URL }}:$SHA" \ + uploads="${{ vars.ECR_URL }}:$SHA" \ + pending-migrations="${{ vars.ECR_URL }}:$SHA" + kubectl set image -n ${KUBE_NAMESPACE} \ - deployment/parliamentary-questions-sidekiq \ - parliamentary-questions-rails-jobs="${{ vars.ECR_URL }}:$SHA" - + deployment/track-a-query-jobs \ + jobs="${{ vars.ECR_URL }}:$SHA" \ + pending-migrations="${{ vars.ECR_URL }}:$SHA" + kubectl set image -n ${KUBE_NAMESPACE} \ - jobs/nightly-import \ - nightly-import="${{ vars.ECR_URL }}:$SHA" - - kubectl set image -n ${KUBE_NAMESPACE} \ - jobs/trim-database \ - trim-database="${{ vars.ECR_URL }}:$SHA" + cronjobs/close-expired-rejected-offender-sars \ + jobs="${{ vars.ECR_URL }}:$SHA" - name: Send deploy notification to product Slack channel uses: slackapi/slack-github-action@v1.25.0 @@ -231,7 +239,7 @@ jobs: "fields": [ { "title": "Project", - "value": "Parliamentary Questions", + "value": "Correspondence Tool Staff", "short": true } ], @@ -305,20 +313,25 @@ jobs: - name: Rollout restart deployment run: | kubectl set image -n ${KUBE_NAMESPACE} \ - deployment/parliamentary-questions \ - parliamentary-questions-rails-app="${{ vars.ECR_URL }}:$SHA" - + deployment/track-a-query \ + webapp="${{ vars.ECR_URL }}:$SHA" \ + quickjobs="${{ vars.ECR_URL }}:$SHA" \ + uploads="${{ vars.ECR_URL }}:$SHA" \ + pending-migrations="${{ vars.ECR_URL }}:$SHA" + kubectl set image -n ${KUBE_NAMESPACE} \ - deployment/parliamentary-questions-sidekiq \ - parliamentary-questions-rails-jobs="${{ vars.ECR_URL }}:$SHA" - + deployment/track-a-query-jobs \ + jobs="${{ vars.ECR_URL }}:$SHA" \ + anonjobs="${{ vars.ECR_URL }}:$SHA" \ + pending-migrations="${{ vars.ECR_URL }}:$SHA" + kubectl set image -n ${KUBE_NAMESPACE} \ - jobs/nightly-import \ - nightly-import="${{ vars.ECR_URL }}:$SHA" - + cronjobs/close-expired-rejected-offender-sars \ + jobs="${{ vars.ECR_URL }}:$SHA" + kubectl set image -n ${KUBE_NAMESPACE} \ - jobs/early-bird-dispatch \ - early-bird-dispatch="${{ vars.ECR_URL }}:$SHA" + cronjobs/eamil-status \ + jobs="${{ vars.ECR_URL }}:$SHA" - name: Send deploy notification to product Slack channel uses: slackapi/slack-github-action@v1.25.0 @@ -332,7 +345,7 @@ jobs: "fields": [ { "title": "Project", - "value": "Parliamentary Questions", + "value": "Correspondence Tool Staff", "short": true } ], @@ -362,7 +375,7 @@ jobs: "fields": [ { "title": "Project", - "value": "Parliamentary Questions", + "value": "Correspondence Tool Staff", "short": true } ], From 925659fc81f95bee498582031e1543b1f4b6a0ad Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 13:38:07 +0100 Subject: [PATCH 03/88] yarn --- .github/workflows/test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 106a6bc151..7e13d09d98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,6 +44,22 @@ jobs: with: node-version: 14.17.5 + - name: Find yarn cache location + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: JS package cache + uses: actions/cache@v4 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install packages + run: | + yarn install --pure-lockfile + - name: Precompile assets run: bin/rails assets:precompile From 5ea21472724bcbc9e890738ac5b063afde3de136 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 13:38:30 +0100 Subject: [PATCH 04/88] rename ping vars --- Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e546b1c36..1df85272c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,11 +41,10 @@ RUN chown -R appuser:appgroup ./* RUN chmod +x /usr/src/app/config/docker/* # expect/add ping environment variables -ARG VERSION_NUMBER -ARG COMMIT_ID -ARG BUILD_DATE -ARG BUILD_TAG +ARG APP_GIT_COMMIT +ARG APP_BUILD_DATE +ARG APP_BUILD_TAG ENV VERSION_NUMBER=${VERSION_NUMBER} -ENV APP_GIT_COMMIT=${COMMIT_ID} -ENV APP_BUILD_DATE=${BUILD_DATE} -ENV APP_BUILD_TAG=${BUILD_TAG} +ENV APP_GIT_COMMIT=${APP_GIT_COMMIT} +ENV APP_BUILD_DATE=${APP_BUILD_DATE} +ENV APP_BUILD_TAG=${APP_BUILD_TAG} From 42d0ba3a62d4476a5e7920aaca009f2059ceddff Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 13:43:59 +0100 Subject: [PATCH 05/88] remove var --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1df85272c1..43293d09d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,7 +44,6 @@ RUN chmod +x /usr/src/app/config/docker/* ARG APP_GIT_COMMIT ARG APP_BUILD_DATE ARG APP_BUILD_TAG -ENV VERSION_NUMBER=${VERSION_NUMBER} ENV APP_GIT_COMMIT=${APP_GIT_COMMIT} ENV APP_BUILD_DATE=${APP_BUILD_DATE} ENV APP_BUILD_TAG=${APP_BUILD_TAG} From be6563d01318673b94520a4e0a72d6d2e53bffb2 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 13:44:43 +0100 Subject: [PATCH 06/88] remove precompile assets step --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e13d09d98..d2908f474e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,9 +60,6 @@ jobs: run: | yarn install --pure-lockfile - - name: Precompile assets - run: bin/rails assets:precompile - - name: Setup test database run: bin/rails db:setup From a6a8d79b3a9e12e678f3951b51172fbc2d9db6a3 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 14:24:08 +0100 Subject: [PATCH 07/88] re add assets precompile --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2908f474e..7e13d09d98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,6 +60,9 @@ jobs: run: | yarn install --pure-lockfile + - name: Precompile assets + run: bin/rails assets:precompile + - name: Setup test database run: bin/rails db:setup From ddf9e5480f651ddc18c7f118ca153393301bd979 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 14:27:53 +0100 Subject: [PATCH 08/88] use test url --- config/database.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.yml b/config/database.yml index 1e8ca64ed3..6e2770eadf 100644 --- a/config/database.yml +++ b/config/database.yml @@ -28,7 +28,7 @@ development: test: <<: *default - database: correspondence_platform_test<%= ENV['TEST_ENV_NUMBER'] %> + url: <%= ENV.fetch('DATABASE_URL', 'postgres://localhost/correspondence_platform_test') %> production: <<: *default From 583c80f947d86b04ef1e88e550f670a5df6b23e4 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 14:30:05 +0100 Subject: [PATCH 09/88] revert last change --- config/database.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.yml b/config/database.yml index 6e2770eadf..1e8ca64ed3 100644 --- a/config/database.yml +++ b/config/database.yml @@ -28,7 +28,7 @@ development: test: <<: *default - url: <%= ENV.fetch('DATABASE_URL', 'postgres://localhost/correspondence_platform_test') %> + database: correspondence_platform_test<%= ENV['TEST_ENV_NUMBER'] %> production: <<: *default From f9e4fd6d99569dd564c570e2b821cda528cfac0c Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Mon, 1 Jul 2024 15:11:19 +0100 Subject: [PATCH 10/88] remove precompile step --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e13d09d98..d2908f474e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,9 +60,6 @@ jobs: run: | yarn install --pure-lockfile - - name: Precompile assets - run: bin/rails assets:precompile - - name: Setup test database run: bin/rails db:setup From b708bce3cce951c0776c0f2532c9148ab06b7c42 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 2 Jul 2024 10:02:12 +0100 Subject: [PATCH 11/88] rename vars --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 43293d09d9..67be134d61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ RUN chown -R appuser:appgroup /usr/src/app/ USER appuser USER 1000 -RUN RAILS_ENV=production AWS_ACCESS_KEY_ID=not_real AWS_SECRET_ACCESS_KEY=not_real bundle exec rake assets:clean assets:precompile assets:non_digested SECRET_KEY_BASE=required_but_does_not_matter_for_assets 2> /dev/null +RUN RAILS_ENV=production ACCESS_KEY_ID=not_real SECRET_ACCESS_KEY=not_real bundle exec rake assets:clean assets:precompile assets:non_digested SECRET_KEY_BASE=required_but_does_not_matter_for_assets 2> /dev/null ENV PUMA_PORT 3000 EXPOSE $PUMA_PORT From a47a3e07077ef0ec99cbdb1c5c94558fc25a2b69 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 2 Jul 2024 10:04:41 +0100 Subject: [PATCH 12/88] rename test db --- config/database.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/database.yml b/config/database.yml index 1e8ca64ed3..f81070cfc0 100644 --- a/config/database.yml +++ b/config/database.yml @@ -28,7 +28,8 @@ development: test: <<: *default - database: correspondence_platform_test<%= ENV['TEST_ENV_NUMBER'] %> + database: correspondence_platform_test + url: <%= ENV["DATABASE_URL"] %> production: <<: *default From f7c0724579ef9f9a083355d4428e6a4d559619c5 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 2 Jul 2024 10:05:36 +0100 Subject: [PATCH 13/88] revert vars change --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 67be134d61..43293d09d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ RUN chown -R appuser:appgroup /usr/src/app/ USER appuser USER 1000 -RUN RAILS_ENV=production ACCESS_KEY_ID=not_real SECRET_ACCESS_KEY=not_real bundle exec rake assets:clean assets:precompile assets:non_digested SECRET_KEY_BASE=required_but_does_not_matter_for_assets 2> /dev/null +RUN RAILS_ENV=production AWS_ACCESS_KEY_ID=not_real AWS_SECRET_ACCESS_KEY=not_real bundle exec rake assets:clean assets:precompile assets:non_digested SECRET_KEY_BASE=required_but_does_not_matter_for_assets 2> /dev/null ENV PUMA_PORT 3000 EXPOSE $PUMA_PORT From 4d9b25e72e21d4453100aa9e631875b10cc1b5d9 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 2 Jul 2024 10:08:33 +0100 Subject: [PATCH 14/88] remove test db --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2908f474e..23ebb77d9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,9 +60,6 @@ jobs: run: | yarn install --pure-lockfile - - name: Setup test database - run: bin/rails db:setup - - name: Lint Ruby files run: bundle exec rubocop From b15035a9fa664be33eb1a588fe5f75c175af1ea2 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 2 Jul 2024 10:11:29 +0100 Subject: [PATCH 15/88] re add db step --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 23ebb77d9c..d2908f474e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,6 +60,9 @@ jobs: run: | yarn install --pure-lockfile + - name: Setup test database + run: bin/rails db:setup + - name: Lint Ruby files run: bundle exec rubocop From 05e481b02bc05c3b464e64157aa49394bd4722cd Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 2 Jul 2024 10:20:36 +0100 Subject: [PATCH 16/88] revert test db config --- config/database.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/database.yml b/config/database.yml index f81070cfc0..1e8ca64ed3 100644 --- a/config/database.yml +++ b/config/database.yml @@ -28,8 +28,7 @@ development: test: <<: *default - database: correspondence_platform_test - url: <%= ENV["DATABASE_URL"] %> + database: correspondence_platform_test<%= ENV['TEST_ENV_NUMBER'] %> production: <<: *default From 757944a905237ce2a6d5d3e1b76f2546ef0bad3d Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 2 Jul 2024 13:14:05 +0100 Subject: [PATCH 17/88] Add access key --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2908f474e..97509d47b9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,8 @@ jobs: POSTGRES_DB: correspondence_platform_test POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + ACCESS_KEY_ID: not_real + SECRET_ACCESS_KEY: not_real ports: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 From dba4b07614655ca06bb1033625806deff7775b9c Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 2 Jul 2024 13:35:02 +0100 Subject: [PATCH 18/88] try access key in database and storage --- .github/workflows/test.yml | 2 -- config/database.yml | 2 ++ config/storage.yml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 97509d47b9..d2908f474e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,8 +26,6 @@ jobs: POSTGRES_DB: correspondence_platform_test POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres - ACCESS_KEY_ID: not_real - SECRET_ACCESS_KEY: not_real ports: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 diff --git a/config/database.yml b/config/database.yml index 1e8ca64ed3..cab8f0f6db 100644 --- a/config/database.yml +++ b/config/database.yml @@ -29,6 +29,8 @@ development: test: <<: *default database: correspondence_platform_test<%= ENV['TEST_ENV_NUMBER'] %> + access_key_id: not_real + secret_access_key: not_real production: <<: *default diff --git a/config/storage.yml b/config/storage.yml index d32f76e8fb..2128813259 100644 --- a/config/storage.yml +++ b/config/storage.yml @@ -1,6 +1,8 @@ test: service: Disk root: <%= Rails.root.join("tmp/storage") %> + access_key_id: not_real + secret_access_key: not_real local: service: Disk From 157e78bddacd4b8b8cdb1d570d48e193cc158942 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 2 Jul 2024 13:40:23 +0100 Subject: [PATCH 19/88] remove key and id --- config/database.yml | 2 -- config/storage.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/config/database.yml b/config/database.yml index cab8f0f6db..1e8ca64ed3 100644 --- a/config/database.yml +++ b/config/database.yml @@ -29,8 +29,6 @@ development: test: <<: *default database: correspondence_platform_test<%= ENV['TEST_ENV_NUMBER'] %> - access_key_id: not_real - secret_access_key: not_real production: <<: *default diff --git a/config/storage.yml b/config/storage.yml index 2128813259..d32f76e8fb 100644 --- a/config/storage.yml +++ b/config/storage.yml @@ -1,8 +1,6 @@ test: service: Disk root: <%= Rails.root.join("tmp/storage") %> - access_key_id: not_real - secret_access_key: not_real local: service: Disk From a68d75883fa72a9ea0969d78b596709fef741c18 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 09:09:16 +0100 Subject: [PATCH 20/88] aws --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2908f474e..1975eb9b31 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,12 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Assume role in Cloud Platform + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }} + aws-region: ${{ vars.ECR_REGION }} + - name: Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: From e6c3bc4e81db4820590e7769d4aefdad1655357e Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 09:11:02 +0100 Subject: [PATCH 21/88] undo --- .github/workflows/test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1975eb9b31..d2908f474e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,12 +34,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Assume role in Cloud Platform - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }} - aws-region: ${{ vars.ECR_REGION }} - - name: Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: From 0872d6e15b53b2a9b4c596c40a6c1b0a9f318b21 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 09:14:47 +0100 Subject: [PATCH 22/88] aws keys step --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2908f474e..e6a37990c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,11 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: AWS credentials + run: | + access_key_id=123 + secret_access_key=456 + - name: Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: From 874fb3b54fa4cd17d0521a142f30504133a8fec5 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 09:17:05 +0100 Subject: [PATCH 23/88] aws keys step --- .github/workflows/test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6a37990c5..39fd76a5c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,11 +34,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: AWS credentials - run: | - access_key_id=123 - secret_access_key=456 - - name: Setup Ruby and install gems uses: ruby/setup-ruby@v1 with: @@ -66,6 +61,9 @@ jobs: yarn install --pure-lockfile - name: Setup test database + env: + access_key_id: 123 + secret_access_key: 456 run: bin/rails db:setup - name: Lint Ruby files From 9c31b22a9fa74b18352d4478f0926c7335a4c9a6 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 09:19:27 +0100 Subject: [PATCH 24/88] aws keys step --- .github/workflows/test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39fd76a5c4..1b9a26f2b6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,8 @@ jobs: env: RAILS_ENV: test DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" + AWS_ACCESS_KEY_ID: 123 + AWS_SECRET_ACCESS_KEY: 456 services: postgres: @@ -61,9 +63,6 @@ jobs: yarn install --pure-lockfile - name: Setup test database - env: - access_key_id: 123 - secret_access_key: 456 run: bin/rails db:setup - name: Lint Ruby files From 9261d7a2a25e2b816a7eee73475aa4978833e1b6 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 10:15:52 +0100 Subject: [PATCH 25/88] use parallel tests --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1b9a26f2b6..9b67232b29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,7 +72,8 @@ jobs: run: bundle exec brakeman -q - name: Run tests - run: bundle exec rspec + run: | + bundle exec rake parallel:spec - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From dd7158481fd241eb6af8a33aa3dff2cc5a6416d3 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 10:26:23 +0100 Subject: [PATCH 26/88] set coverage --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b67232b29..53d892bab2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,6 +81,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} minimum_suite_coverage: 92 minimum_file_coverage: 100 + COVERAGE: 1 build-and-deploy: if: ${{ github.ref == 'refs/heads/main' }} From 8d1ad2dabf1a32a9311ab94b1958aa9c5f6367b4 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 11:08:37 +0100 Subject: [PATCH 27/88] set tests and cov --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 53d892bab2..502c069328 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -73,6 +73,10 @@ jobs: - name: Run tests run: | + export PARALLEL_TEST_PROCESSORS=8 + export COVERAGE=1 + bundle exec rake parallel:create + bundle exec rake parallel:prepare bundle exec rake parallel:spec - name: Code coverage @@ -81,7 +85,6 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} minimum_suite_coverage: 92 minimum_file_coverage: 100 - COVERAGE: 1 build-and-deploy: if: ${{ github.ref == 'refs/heads/main' }} From 88b1e236ac04f112c1316b8e97eb0f8501be2835 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 11:11:45 +0100 Subject: [PATCH 28/88] remove processors --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 502c069328..0365ac07d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -73,7 +73,6 @@ jobs: - name: Run tests run: | - export PARALLEL_TEST_PROCESSORS=8 export COVERAGE=1 bundle exec rake parallel:create bundle exec rake parallel:prepare From c8129042817d3c15c069d9c42c13e40aa584a352 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 11:24:45 +0100 Subject: [PATCH 29/88] retry --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0365ac07d8..a07ef3432d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,10 +71,9 @@ jobs: - name: Security audit application code run: bundle exec brakeman -q - - name: Run tests + - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake parallel:create bundle exec rake parallel:prepare bundle exec rake parallel:spec From 0c2457e801af79a1296aa0381b1be45e9d2c599b Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 11:39:44 +0100 Subject: [PATCH 30/88] retry --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a07ef3432d..a1fbd032ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: env: RAILS_ENV: test - DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" + DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test"<%= ENV['TEST_ENV_NUMBER'] %> AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 @@ -74,7 +74,7 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake parallel:prepare + bundle exec rake parallel:setup bundle exec rake parallel:spec - name: Code coverage From 50bd2d49c37a1289df1d9cbc3d8bd3ff37b95168 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 11:42:08 +0100 Subject: [PATCH 31/88] retry --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1fbd032ea..2667814495 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: env: RAILS_ENV: test - DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test"<%= ENV['TEST_ENV_NUMBER'] %> + DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 From 97d9950e8d9f7f2020b1ac9b228c9b0b7e9e4c5a Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 11:44:58 +0100 Subject: [PATCH 32/88] retry --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2667814495..6d307b86a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,8 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake parallel:setup + bundle exec rake parallel:create + bundle exec rake parallel:prepare bundle exec rake parallel:spec - name: Code coverage From e15a31b5499371273189a76474d269b14afb016f Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 11:54:05 +0100 Subject: [PATCH 33/88] retry --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d307b86a8..329b78bc75 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,8 +74,7 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake parallel:create - bundle exec rake parallel:prepare + bundle exec rake parallel:setup[2] bundle exec rake parallel:spec - name: Code coverage From fe6b110859d2533b8453a0b23308cf25f353dd0c Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 13:16:08 +0100 Subject: [PATCH 34/88] revert to long test --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 329b78bc75..74a64b7299 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,6 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake parallel:setup[2] bundle exec rake parallel:spec - name: Code coverage From ed6efc58d85ce149e08f246b541297103cbc8f08 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 13:22:27 +0100 Subject: [PATCH 35/88] specify ENV --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 74a64b7299..01a15b2d67 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,8 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake parallel:spec + RAILS_ENV=test bundle exec rake parallel:setup + RAILS_ENV=test bundle exec rake parallel:spec - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From 051ba101ee06749538a29a48a25ede1b11774a7d Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 13:25:31 +0100 Subject: [PATCH 36/88] remove status --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01a15b2d67..7ff63585ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,6 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - RAILS_ENV=test bundle exec rake parallel:setup RAILS_ENV=test bundle exec rake parallel:spec - name: Code coverage From 281d9ced50fd0db2dd59ac0f2547270f40a349d6 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 13:32:05 +0100 Subject: [PATCH 37/88] serial --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ff63585ad..49d1d945ba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - RAILS_ENV=test bundle exec rake parallel:spec + bundle exec rake spec:serial - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From 209440e48f85ca46e34125fc8b800df95b269a9d Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 15:09:24 +0100 Subject: [PATCH 38/88] use parallel spec --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 49d1d945ba..74a64b7299 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake spec:serial + bundle exec rake parallel:spec - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From cdcbce81ef459bbe6914de74fd5635092dd5f726 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Thu, 4 Jul 2024 15:20:52 +0100 Subject: [PATCH 39/88] create --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 74a64b7299..10e46d7906 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,6 +74,7 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 + bundle exec rake parallel:create bundle exec rake parallel:spec - name: Code coverage From 21a133dd81b848ed82337f0c3727f0816fc600a6 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 08:06:27 +0100 Subject: [PATCH 40/88] setup databases --- .github/workflows/test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 10e46d7906..17fda7b2ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,6 @@ jobs: DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 - services: postgres: image: postgres:12-alpine @@ -63,7 +62,8 @@ jobs: yarn install --pure-lockfile - name: Setup test database - run: bin/rails db:setup + run: | + bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop @@ -74,7 +74,6 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake parallel:create bundle exec rake parallel:spec - name: Code coverage From 3c0d122080d82f590650966e4a63358a589d7230 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 08:12:26 +0100 Subject: [PATCH 41/88] drop databases first --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 17fda7b2ee..cfa723d148 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,6 +63,7 @@ jobs: - name: Setup test database run: | + bundle exec rake parallel:drop bundle exec rake parallel:setup - name: Lint Ruby files From 28500c598ddba9c2c0b62e8b25a61c81201cae94 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 08:20:51 +0100 Subject: [PATCH 42/88] drop databases first --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cfa723d148..3c70002414 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,8 @@ jobs: postgres: image: postgres:12-alpine env: - POSTGRES_DB: correspondence_platform_test +# POSTGRES_DB: correspondence_platform_test + RAILS_ENV: test POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: @@ -63,7 +64,6 @@ jobs: - name: Setup test database run: | - bundle exec rake parallel:drop bundle exec rake parallel:setup - name: Lint Ruby files From 274af27e3b6754c1431e236a8c74f66c300e0c25 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 08:46:25 +0100 Subject: [PATCH 43/88] retry --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3c70002414..e7b0e163ff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,8 +24,7 @@ jobs: postgres: image: postgres:12-alpine env: -# POSTGRES_DB: correspondence_platform_test - RAILS_ENV: test + POSTGRES_DB: correspondence_platform_test POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: @@ -62,9 +61,9 @@ jobs: run: | yarn install --pure-lockfile - - name: Setup test database - run: | - bundle exec rake parallel:setup +# - name: Setup test database +# run: | +# bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop @@ -75,7 +74,8 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake parallel:spec + bin/bundle exec rake parallel:setup + bin/bundle exec rake parallel:spec - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From c1fe8b0b548bbc5ea946c909cc12c0f5f75dad10 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 08:48:54 +0100 Subject: [PATCH 44/88] retry --- .github/workflows/test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7b0e163ff..524c8be8ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,9 +61,9 @@ jobs: run: | yarn install --pure-lockfile -# - name: Setup test database -# run: | -# bundle exec rake parallel:setup + - name: Setup test database + run: | + bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop @@ -74,7 +74,6 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bin/bundle exec rake parallel:setup bin/bundle exec rake parallel:spec - name: Code coverage From 6f98796fc46d61e3ee6b8c22ca73989f15a20210 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 08:50:46 +0100 Subject: [PATCH 45/88] retry --- .github/workflows/test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 524c8be8ab..d32fbbdd58 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: env: RAILS_ENV: test - DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" +# DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 services: @@ -62,8 +62,7 @@ jobs: yarn install --pure-lockfile - name: Setup test database - run: | - bundle exec rake parallel:setup + run: bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop @@ -74,7 +73,7 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bin/bundle exec rake parallel:spec + bundle exec rake parallel:spec - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From 5c112ed7b46f6c324fc5702f5df3828938f56a01 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 08:55:08 +0100 Subject: [PATCH 46/88] retry --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d32fbbdd58..df777fe897 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: env: RAILS_ENV: test -# DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" + DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 services: @@ -62,7 +62,7 @@ jobs: yarn install --pure-lockfile - name: Setup test database - run: bundle exec rake parallel:setup + run: bin/rails db:setup - name: Lint Ruby files run: bundle exec rubocop From ec665672e1939f3220391446cfb40767d712222a Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 10:25:56 +0100 Subject: [PATCH 47/88] use groups --- .github/workflows/test.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df777fe897..434cdbe18e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true jobs: - test: + rspec: runs-on: ubuntu-latest permissions: checks: write @@ -20,6 +20,20 @@ jobs: DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 + strategy: + fail-fast: false + matrix: + # Set N number of parallel jobs you want to run. + # Normally equal to the number of CPU cores but in this case relates to the total number of test groups to be run across all runners. + ci_total_jobs: [ 4 ] + # Remember to update ci_node_index below to 0..N-1 + # When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc. For larger runners runners with more CPU adjust accordingly. + ci_job_index: + [ + "0, 1", + "2, 3", + ] + services: postgres: image: postgres:12-alpine @@ -27,6 +41,8 @@ jobs: POSTGRES_DB: correspondence_platform_test POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres + CI_TOTAL_JOBS: ${{ matrix.ci_total_jobs }} + CI_JOB_INDEX: ${{ matrix.ci_job_index }} ports: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -73,7 +89,12 @@ jobs: - name: Run unit and feature tests run: | export COVERAGE=1 - bundle exec rake parallel:spec + echo "::group::parallel:setup" + bundle exec rake parallel:setup[2] + echo "::endgroup::" + echo "::group::parallel:spec" + bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec + echo "::endgroup::" - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From 343516b697ee88f02b1a217c48536765a9bca5d2 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 10:26:59 +0100 Subject: [PATCH 48/88] use groups --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 434cdbe18e..490830e229 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true jobs: - rspec: + test: runs-on: ubuntu-latest permissions: checks: write From 3d6d57e165954f7b628e10244147a1cbcc9b7108 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 10:33:28 +0100 Subject: [PATCH 49/88] use groups --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 490830e229..0910e0c7dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,7 +78,7 @@ jobs: yarn install --pure-lockfile - name: Setup test database - run: bin/rails db:setup + run: bundle exec rake parallel:setup[2] - name: Lint Ruby files run: bundle exec rubocop @@ -90,7 +90,6 @@ jobs: run: | export COVERAGE=1 echo "::group::parallel:setup" - bundle exec rake parallel:setup[2] echo "::endgroup::" echo "::group::parallel:spec" bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec From 720a36d7805589b1d736da818da0efa9a6d46095 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 10:35:12 +0100 Subject: [PATCH 50/88] use groups --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0910e0c7dd..f692c623ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,7 +78,7 @@ jobs: yarn install --pure-lockfile - name: Setup test database - run: bundle exec rake parallel:setup[2] + run: bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop From 192b79116228a7b8459d19f352ef01bdb46c25cf Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 11:13:11 +0100 Subject: [PATCH 51/88] use groups --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f692c623ef..c303851a52 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,8 @@ jobs: DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 + CI_TOTAL_JOBS: ${{ matrix.ci_total_jobs }} + CI_JOB_INDEX: ${{ matrix.ci_job_index }} strategy: fail-fast: false matrix: @@ -41,8 +43,6 @@ jobs: POSTGRES_DB: correspondence_platform_test POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres - CI_TOTAL_JOBS: ${{ matrix.ci_total_jobs }} - CI_JOB_INDEX: ${{ matrix.ci_job_index }} ports: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 @@ -78,7 +78,7 @@ jobs: yarn install --pure-lockfile - name: Setup test database - run: bundle exec rake parallel:setup + run: bin/rails db:setup - name: Lint Ruby files run: bundle exec rubocop @@ -90,6 +90,7 @@ jobs: run: | export COVERAGE=1 echo "::group::parallel:setup" + bundle exec rake parallel:setup[2] echo "::endgroup::" echo "::group::parallel:spec" bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec From 59bd7fc696569a01ff900102de6bf3d625a90067 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 11:22:41 +0100 Subject: [PATCH 52/88] use groups --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c303851a52..a1ab08d719 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,7 +78,7 @@ jobs: yarn install --pure-lockfile - name: Setup test database - run: bin/rails db:setup + run: bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop From c09876a9efb6fd24824cce976202196e559581c9 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 11:25:40 +0100 Subject: [PATCH 53/88] use groups --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1ab08d719..aa4956d5eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,8 +77,8 @@ jobs: run: | yarn install --pure-lockfile - - name: Setup test database - run: bundle exec rake parallel:setup +# - name: Setup test database +# run: bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop From c442d6e1db1102464d3f7a03f7ea5270c2ec6f30 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 11:44:09 +0100 Subject: [PATCH 54/88] use groups --- .github/workflows/test.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aa4956d5eb..5096438229 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,8 +77,10 @@ jobs: run: | yarn install --pure-lockfile -# - name: Setup test database -# run: bundle exec rake parallel:setup + - name: Setup test database + env: + RAILS_ENV: test + run: bundle exec parallel:spec - name: Lint Ruby files run: bundle exec rubocop @@ -87,14 +89,17 @@ jobs: run: bundle exec brakeman -q - name: Run unit and feature tests + env: + RAILS_ENV: test run: | + echo "\n\n$RAILS_ENV\n\n" export COVERAGE=1 - echo "::group::parallel:setup" - bundle exec rake parallel:setup[2] - echo "::endgroup::" - echo "::group::parallel:spec" - bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec - echo "::endgroup::" +# echo "::group::parallel:setup" + bundle exec rspec +# echo "::endgroup::" +# echo "::group::parallel:spec" +# bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec +# echo "::endgroup::" - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From ee55b537a27bd508559352ec9ecb573c7170942e Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 11:44:55 +0100 Subject: [PATCH 55/88] use groups --- .github/workflows/test.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5096438229..f58ad02c8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,12 +94,7 @@ jobs: run: | echo "\n\n$RAILS_ENV\n\n" export COVERAGE=1 -# echo "::group::parallel:setup" - bundle exec rspec -# echo "::endgroup::" -# echo "::group::parallel:spec" -# bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec -# echo "::endgroup::" + bundle exec rspec - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From bc9e731f8f933d2fc1d545477ffe92326b98e26c Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 11:46:41 +0100 Subject: [PATCH 56/88] use groups --- .github/workflows/test.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f58ad02c8d..c58a52f9af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,7 +80,7 @@ jobs: - name: Setup test database env: RAILS_ENV: test - run: bundle exec parallel:spec + run: bundle exec rake parallel:spec - name: Lint Ruby files run: bundle exec rubocop @@ -94,7 +94,12 @@ jobs: run: | echo "\n\n$RAILS_ENV\n\n" export COVERAGE=1 - bundle exec rspec +# echo "::group::parallel:setup" + bundle exec rspec +# echo "::endgroup::" +# echo "::group::parallel:spec" +# bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec +# echo "::endgroup::" - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From 66db533cd34659ce7c7c276e52dd7e29e8f01da6 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 11:47:02 +0100 Subject: [PATCH 57/88] use groups --- .github/workflows/test.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c58a52f9af..3c4ce5bf35 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,12 +94,7 @@ jobs: run: | echo "\n\n$RAILS_ENV\n\n" export COVERAGE=1 -# echo "::group::parallel:setup" bundle exec rspec -# echo "::endgroup::" -# echo "::group::parallel:spec" -# bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec -# echo "::endgroup::" - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From eb35902883a3bfa0ee7f88ec543c5a6bdadcf500 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 11:49:27 +0100 Subject: [PATCH 58/88] use groups --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3c4ce5bf35..27387ad856 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,7 +80,7 @@ jobs: - name: Setup test database env: RAILS_ENV: test - run: bundle exec rake parallel:spec + run: bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop From dcd2c64d1c1344ef3b04fa8398d3885cc70bd322 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 11:52:46 +0100 Subject: [PATCH 59/88] use groups --- .github/workflows/test.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 27387ad856..d6bcf38e13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,10 +77,10 @@ jobs: run: | yarn install --pure-lockfile - - name: Setup test database - env: - RAILS_ENV: test - run: bundle exec rake parallel:setup +# - name: Setup test database +# env: +# RAILS_ENV: test +# run: bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop @@ -92,9 +92,12 @@ jobs: env: RAILS_ENV: test run: | - echo "\n\n$RAILS_ENV\n\n" - export COVERAGE=1 - bundle exec rspec + echo "::group::parallel:setup" + bundle exec rake parallel:setup[2] + echo "::endgroup::" + echo "::group::parallel:spec" + bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec + echo "::endgroup::" - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From 0c7991116d5303f233c45ec63e21dc8bcbb63ec4 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 12:04:53 +0100 Subject: [PATCH 60/88] use groups --- .github/workflows/test.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d6bcf38e13..d6a60093a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,10 +77,8 @@ jobs: run: | yarn install --pure-lockfile -# - name: Setup test database -# env: -# RAILS_ENV: test -# run: bundle exec rake parallel:setup + - name: Setup test database + run: bin/rails db:prepare - name: Lint Ruby files run: bundle exec rubocop @@ -89,15 +87,8 @@ jobs: run: bundle exec brakeman -q - name: Run unit and feature tests - env: - RAILS_ENV: test run: | - echo "::group::parallel:setup" - bundle exec rake parallel:setup[2] - echo "::endgroup::" - echo "::group::parallel:spec" - bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec - echo "::endgroup::" + bundle exec rake parallel:spec - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From e100c9bb33412f191c2d4e2b769b9ace9ee67f8d Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 12:09:56 +0100 Subject: [PATCH 61/88] use groups --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d6a60093a2..e0b7216daa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,7 +78,9 @@ jobs: yarn install --pure-lockfile - name: Setup test database - run: bin/rails db:prepare + run: | + bundle exec rake parallel:create + bundle exec rake parallel:setup - name: Lint Ruby files run: bundle exec rubocop From 6f6d7ad4a8840c9d8e38b65f43b8a8a6adeb145c Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 12:12:33 +0100 Subject: [PATCH 62/88] use groups --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e0b7216daa..8896b055a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,6 @@ jobs: postgres: image: postgres:12-alpine env: - POSTGRES_DB: correspondence_platform_test POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: From de8364b92f82e5eeb7fce4ddeeda381da552446f Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 12:14:34 +0100 Subject: [PATCH 63/88] use groups --- .github/workflows/test.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8896b055a6..18ee346a71 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,22 +20,6 @@ jobs: DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 - CI_TOTAL_JOBS: ${{ matrix.ci_total_jobs }} - CI_JOB_INDEX: ${{ matrix.ci_job_index }} - strategy: - fail-fast: false - matrix: - # Set N number of parallel jobs you want to run. - # Normally equal to the number of CPU cores but in this case relates to the total number of test groups to be run across all runners. - ci_total_jobs: [ 4 ] - # Remember to update ci_node_index below to 0..N-1 - # When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc. For larger runners runners with more CPU adjust accordingly. - ci_job_index: - [ - "0, 1", - "2, 3", - ] - services: postgres: image: postgres:12-alpine From 162701876bfbc23ad1ffce097b48efabe6d3234a Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Tue, 9 Jul 2024 12:17:17 +0100 Subject: [PATCH 64/88] use groups --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18ee346a71..54ca7195eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,6 +24,7 @@ jobs: postgres: image: postgres:12-alpine env: + POSTGRES_DB: correspondence_platform_test POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: From 0a3e1cb211ea395d42f3f275ecb82b52b8147010 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 14:20:32 +0100 Subject: [PATCH 65/88] Add matrix --- .github/workflows/test.yml | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54ca7195eb..12b1885979 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,7 @@ concurrency: jobs: test: + name: Test groups ${{ matrix.ci_job_index }} runs-on: ubuntu-latest permissions: checks: write @@ -20,6 +21,8 @@ jobs: DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 + CI_TOTAL_JOBS: ${{ matrix.ci_total_jobs }} + CI_JOB_INDEX: ${{ matrix.ci_job_index }} services: postgres: image: postgres:12-alpine @@ -30,6 +33,11 @@ jobs: ports: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + strategy: + fail-fast: false + matrix: + ci_total_jobs: [8] + ci_job_index: [ "0, 1", "2, 3", "4", "5", "6", "7"] steps: - name: Checkout code @@ -61,27 +69,25 @@ jobs: run: | yarn install --pure-lockfile - - name: Setup test database - run: | - bundle exec rake parallel:create - bundle exec rake parallel:setup - - - name: Lint Ruby files - run: bundle exec rubocop + # - name: Lint Ruby files + # run: bundle exec rubocop - - name: Security audit application code - run: bundle exec brakeman -q + # - name: Security audit application code + # run: bundle exec brakeman -q - name: Run unit and feature tests run: | - bundle exec rake parallel:spec + echo "::group::parallel:setup" + bundle exec rake parallel:setup[2] + echo "::group::parallel:spec" + bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec - - name: Code coverage - uses: joshmfrankel/simplecov-check-action@main - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - minimum_suite_coverage: 92 - minimum_file_coverage: 100 + # - name: Code coverage + # uses: joshmfrankel/simplecov-check-action@main + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # minimum_suite_coverage: 92 + # minimum_file_coverage: 100 build-and-deploy: if: ${{ github.ref == 'refs/heads/main' }} From fa110e1935b6477f192a45bc7687cfa1be65c168 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 14:28:03 +0100 Subject: [PATCH 66/88] Use job index in db name --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 12b1885979..46847d28b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: env: RAILS_ENV: test - DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1/correspondence_platform_test" + DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 CI_TOTAL_JOBS: ${{ matrix.ci_total_jobs }} @@ -27,7 +27,7 @@ jobs: postgres: image: postgres:12-alpine env: - POSTGRES_DB: correspondence_platform_test + POSTGRES_DB: correspondence_platform_test${{ matrix.ci_job_index }} POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: From 7e72a2293f9e3aba1e083606143c1fc63123ab25 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 14:46:54 +0100 Subject: [PATCH 67/88] Create linting step --- .github/workflows/test.yml | 43 +++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46847d28b2..05f8924caf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,8 +10,30 @@ concurrency: cancel-in-progress: true jobs: + linting: + runs-on: ubuntu-latest + permissions: + checks: write + env: + RAILS_ENV: test + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Ruby and install gems + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Lint Ruby files + run: bundle exec rubocop + + - name: Security audit application code + run: bundle exec brakeman -q + test: name: Test groups ${{ matrix.ci_job_index }} + needs: linting runs-on: ubuntu-latest permissions: checks: write @@ -36,8 +58,13 @@ jobs: strategy: fail-fast: false matrix: - ci_total_jobs: [8] - ci_job_index: [ "0, 1", "2, 3", "4", "5", "6", "7"] + ci_total_jobs: [4] + ci_job_index: [ + "0, 1", + "2, 3", + "4, 5", + "6, 7" + ] steps: - name: Checkout code @@ -82,12 +109,12 @@ jobs: echo "::group::parallel:spec" bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec - # - name: Code coverage - # uses: joshmfrankel/simplecov-check-action@main - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # minimum_suite_coverage: 92 - # minimum_file_coverage: 100 + - name: Code coverage + uses: joshmfrankel/simplecov-check-action@main + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + minimum_suite_coverage: 92 + minimum_file_coverage: 100 build-and-deploy: if: ${{ github.ref == 'refs/heads/main' }} From 69ed3f3491edfc752ddf61c36bf99ba5ef1da059 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 14:57:18 +0100 Subject: [PATCH 68/88] tweak --- .github/workflows/test.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05f8924caf..27890e3af0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,7 +49,7 @@ jobs: postgres: image: postgres:12-alpine env: - POSTGRES_DB: correspondence_platform_test${{ matrix.ci_job_index }} + POSTGRES_DB: correspondence_platform_test${{ TEST_ENV_NUMBER }} POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: @@ -58,7 +58,7 @@ jobs: strategy: fail-fast: false matrix: - ci_total_jobs: [4] + ci_total_jobs: [8] ci_job_index: [ "0, 1", "2, 3", @@ -96,12 +96,6 @@ jobs: run: | yarn install --pure-lockfile - # - name: Lint Ruby files - # run: bundle exec rubocop - - # - name: Security audit application code - # run: bundle exec brakeman -q - - name: Run unit and feature tests run: | echo "::group::parallel:setup" From dda251e828d089ce2cffdf05fad2127ae885115a Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 15:01:12 +0100 Subject: [PATCH 69/88] Use CI_JOB_INDEX --- .github/workflows/test.yml | 2 +- config/database.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 27890e3af0..4af84e7ed2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,7 +49,7 @@ jobs: postgres: image: postgres:12-alpine env: - POSTGRES_DB: correspondence_platform_test${{ TEST_ENV_NUMBER }} + POSTGRES_DB: correspondence_platform_test${{ matrix.ci_job_index }} POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: diff --git a/config/database.yml b/config/database.yml index 1e8ca64ed3..4447a79bca 100644 --- a/config/database.yml +++ b/config/database.yml @@ -28,7 +28,7 @@ development: test: <<: *default - database: correspondence_platform_test<%= ENV['TEST_ENV_NUMBER'] %> + database: correspondence_platform_test<%= ENV['CI_JOB_INDEX'] %> production: <<: *default From e677b4de415bb5851fc4bb9ae7d4fbac73dfb0c1 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 15:07:31 +0100 Subject: [PATCH 70/88] Use TEST_ENV_NUMBER --- config/database.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.yml b/config/database.yml index 4447a79bca..1e8ca64ed3 100644 --- a/config/database.yml +++ b/config/database.yml @@ -28,7 +28,7 @@ development: test: <<: *default - database: correspondence_platform_test<%= ENV['CI_JOB_INDEX'] %> + database: correspondence_platform_test<%= ENV['TEST_ENV_NUMBER'] %> production: <<: *default From bdd4874dd81f151d793603249dc1468cb15271e8 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 15:09:08 +0100 Subject: [PATCH 71/88] remove --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4af84e7ed2..6a1ae39033 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,7 +49,6 @@ jobs: postgres: image: postgres:12-alpine env: - POSTGRES_DB: correspondence_platform_test${{ matrix.ci_job_index }} POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: From 856b0a9ffa8d29482e3042ef93098ffa71139d5f Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 15:16:22 +0100 Subject: [PATCH 72/88] Separate coverage job --- .github/workflows/test.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a1ae39033..0c5789bb5c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,8 +12,6 @@ concurrency: jobs: linting: runs-on: ubuntu-latest - permissions: - checks: write env: RAILS_ENV: test steps: @@ -97,11 +95,17 @@ jobs: - name: Run unit and feature tests run: | - echo "::group::parallel:setup" bundle exec rake parallel:setup[2] - echo "::group::parallel:spec" bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec + coverage: + needs: linting + runs-on: ubuntu-latest + permissions: + checks: write + env: + RAILS_ENV: test + steps: - name: Code coverage uses: joshmfrankel/simplecov-check-action@main with: @@ -111,6 +115,6 @@ jobs: build-and-deploy: if: ${{ github.ref == 'refs/heads/main' }} - needs: test + needs: coverage uses: ./.github/workflows/deploy.yml secrets: inherit From f382e106f7dd4e4fd618328b6e1ca40bdfa1de05 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 15:27:17 +0100 Subject: [PATCH 73/88] Fix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c5789bb5c..3190eda366 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -99,7 +99,7 @@ jobs: bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec coverage: - needs: linting + needs: test runs-on: ubuntu-latest permissions: checks: write From 63c5358ffa1517ec62c491b333b5adcc8a64b9b8 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 16:09:38 +0100 Subject: [PATCH 74/88] Try all jobs in one instance --- .github/workflows/test.yml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3190eda366..d18e597428 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,12 +55,9 @@ jobs: strategy: fail-fast: false matrix: - ci_total_jobs: [8] + ci_total_jobs: [6] ci_job_index: [ - "0, 1", - "2, 3", - "4, 5", - "6, 7" + "0, 1, 2, 3, 4, 5" ] steps: @@ -98,14 +95,6 @@ jobs: bundle exec rake parallel:setup[2] bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec - coverage: - needs: test - runs-on: ubuntu-latest - permissions: - checks: write - env: - RAILS_ENV: test - steps: - name: Code coverage uses: joshmfrankel/simplecov-check-action@main with: @@ -115,6 +104,6 @@ jobs: build-and-deploy: if: ${{ github.ref == 'refs/heads/main' }} - needs: coverage + needs: test uses: ./.github/workflows/deploy.yml secrets: inherit From b1f5ec6bcb8ab0310470bf53ccac3913470b73f2 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 16:13:05 +0100 Subject: [PATCH 75/88] Update parallel setup --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d18e597428..be3d41fdea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -92,7 +92,7 @@ jobs: - name: Run unit and feature tests run: | - bundle exec rake parallel:setup[2] + bundle exec rake parallel:setup[6] bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec - name: Code coverage From 39ff1281269389a1188dd719439b6fe7bf599516 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 17:12:10 +0100 Subject: [PATCH 76/88] Fix deprecation --- config/environments/test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index 48fe89b635..5a5350128d 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -94,7 +94,7 @@ config.cache_store = :null_store # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false + config.action_dispatch.show_exceptions = :none # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false From 8f9bf182bcff7167febe3035b7433ac5ef9c4979 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 17:12:28 +0100 Subject: [PATCH 77/88] Make simplecov work with multiple processes --- spec/rails_helper.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index a828dc2098..43bec07566 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -11,6 +11,18 @@ add_filter "/app/mailers/application_mailer.rb" add_filter "/lib/" end + + class ActiveSupport::TestCase + parallelize(workers: 6) + + parallelize_setup do |worker| + SimpleCov.command_name "#{SimpleCov.command_name}-#{worker}" + end + + parallelize_teardown do + SimpleCov.result + end + end end # This file is copied to spec/ when you run 'rails generate rspec:install' From 31c3e6fcbc6d36037749955f8bf87d52b356ba54 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Tue, 9 Jul 2024 17:17:23 +0100 Subject: [PATCH 78/88] Enable new cache format --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 18ff1b54e1..2ac225aa57 100755 --- a/config/application.rb +++ b/config/application.rb @@ -25,7 +25,7 @@ class Application < Rails::Application # TODO: Enable this after version with Rails 7.1 has been released to prod # Change the format of the cache entry. - # config.active_support.cache_format_version = 7.1 + config.active_support.cache_format_version = 7.1 # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. From 7a139ffff96c2b38b42dca4cb859ab33fc41ea58 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Wed, 10 Jul 2024 09:59:05 +0100 Subject: [PATCH 79/88] Remove --- spec/rails_helper.rb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 43bec07566..a828dc2098 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -11,18 +11,6 @@ add_filter "/app/mailers/application_mailer.rb" add_filter "/lib/" end - - class ActiveSupport::TestCase - parallelize(workers: 6) - - parallelize_setup do |worker| - SimpleCov.command_name "#{SimpleCov.command_name}-#{worker}" - end - - parallelize_teardown do - SimpleCov.result - end - end end # This file is copied to spec/ when you run 'rails generate rspec:install' From 6a7f458db2a7aaea18cc316b35a38305984127ac Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Wed, 10 Jul 2024 09:59:24 +0100 Subject: [PATCH 80/88] Try different config --- .github/workflows/test.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be3d41fdea..94b3126e3f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,9 +55,10 @@ jobs: strategy: fail-fast: false matrix: - ci_total_jobs: [6] + ci_total_jobs: [8] ci_job_index: [ - "0, 1, 2, 3, 4, 5" + "0, 1, 2, 3", + "4, 5, 6, 7" ] steps: @@ -92,15 +93,15 @@ jobs: - name: Run unit and feature tests run: | - bundle exec rake parallel:setup[6] + bundle exec rake parallel:setup[4] bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec - - name: Code coverage - uses: joshmfrankel/simplecov-check-action@main - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - minimum_suite_coverage: 92 - minimum_file_coverage: 100 + # - name: Code coverage + # uses: joshmfrankel/simplecov-check-action@main + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # minimum_suite_coverage: 92 + # minimum_file_coverage: 100 build-and-deploy: if: ${{ github.ref == 'refs/heads/main' }} From 2df069bad557053e90a425b9c777834a9a177697 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Wed, 10 Jul 2024 10:22:58 +0100 Subject: [PATCH 81/88] add more --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94b3126e3f..e6b995af54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,10 +55,12 @@ jobs: strategy: fail-fast: false matrix: - ci_total_jobs: [8] + ci_total_jobs: [16] ci_job_index: [ "0, 1, 2, 3", - "4, 5, 6, 7" + "4, 5, 6, 7", + "8, 9, 10, 11", + "12, 13, 14, 15" ] steps: From 3f96f7ee445f11566c97d0630a1020bf2a5a32d1 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Wed, 10 Jul 2024 12:03:10 +0100 Subject: [PATCH 82/88] redo test times --- tmp/parallel_runtime_rspec.log | 1078 ++++++++++++++++---------------- 1 file changed, 555 insertions(+), 523 deletions(-) diff --git a/tmp/parallel_runtime_rspec.log b/tmp/parallel_runtime_rspec.log index ef74d6024a..36ccf7f40b 100644 --- a/tmp/parallel_runtime_rspec.log +++ b/tmp/parallel_runtime_rspec.log @@ -1,547 +1,579 @@ Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} -spec/controllers/assignments_controller/execute_reassign_user_spec.rb:5.122830817999784 -spec/controllers/cases/amendments_controller_spec.rb:5.4836210740031675 -spec/controllers/cases/approvals_controller_spec.rb:2.6521068249858217 -spec/controllers/cases/data_requests_controller_spec.rb:1.801011728006415 -spec/controllers/cases/foi_controller_spec.rb:21.281180799996946 -spec/controllers/cases/ico_foi_controller_spec.rb:2.53270201900159 -spec/controllers/cases/messages_controller_spec.rb:14.464700447002542 -spec/controllers/cases_controller/permitted_correspondence_types_spec.rb:0.34441656900162343 -spec/controllers/devise/sessions_controller_spec.rb:0.21596256000339054 -spec/controllers/pages_controller_spec.rb:0.02684248199511785 -spec/controllers/teams_controller_spec.rb:10.955157550997683 -spec/decorators/case/sar_decorator_spec.rb:0.1268918820132967 -spec/decorators/foi_compliance_review_spec.rb:0.06365132199425716 -spec/decorators/search_query_decorator_spec.rb:0.5000451070081908 -spec/features/admin/add_information_officer_spec.rb:1.8193890410038875 -spec/features/admin/cases/adding_cases_spec.rb:18.916256864991738 -spec/features/admin/joining_teams_spec.rb:8.010662154993042 -spec/features/cases/foi/case_closing_spec.rb:37.03237066399015 -spec/features/cases/foi/case_request_further_clearance_spec.rb:4.711819663993083 -spec/features/cases/foi/case_viewing/removing_response_spec.rb:16.590313795997645 -spec/features/cases/ico/require_further_action_ico_foi_spec.rb:27.65840085298987 -spec/features/cases/offender_sar/adding_note_to_case_history_spec.rb:1.020788232999621 -spec/features/cases/offender_sar/case_creating_spec.rb:30.634798798011616 -spec/features/cases/offender_sar/case_progressing_spec.rb:25.7960664100101 -spec/features/cases/offender_sar_complaint/case_viewing_spec.rb:7.144901822990505 -spec/features/cases/sar/case_assigning_new_team_spec.rb:5.759520814011921 -spec/features/cases/sar/case_search_spec.rb:3.2965640510083176 -spec/features/cases/sar_internal_review/case_filtering_spec.rb:5.522369543003151 -spec/features/common/password_spec.rb:0.9087320109974826 -spec/features/user_journeys/foi/downloading_stats_spec.rb:10.775745685998118 -spec/form_models/offender_sar_complaint_case_form_spec.rb:2.480821391000063 -spec/forms/retention_schedule_form_spec.rb:0.06804274099704344 -spec/helpers/cases_helper_spec.rb:11.647458006002125 -spec/jobs/search_index_updater_job_spec.rb:0.19345368999347556 -spec/models/case/foi/timeliness_review_spec.rb:0.17143159499391913 -spec/models/case/predicates_spec.rb:2.0919594800070627 -spec/models/commissioning_document_template/base_spec.rb:0.0337039209989598 -spec/models/concerns/searchable_spec.rb:0.008930661992053501 -spec/models/directorate_spec.rb:0.027584793002461083 -spec/models/report_type_spec.rb:0.11339416400005575 -spec/models/reporting_period/calculator_spec.rb:0.01761870899645146 -spec/policies/cases/overturned_ico/foi_policy_spec.rb:36.609439595005824 -spec/policies/cases/sar/internal_review_policy_spec.rb:8.340285773010692 -spec/services/anonymise_case_service_spec.rb:16.177379679997102 -spec/services/case_create_service_spec.rb:16.558915786998114 -spec/services/case_filter/case_partial_case_flag_filter_spec.rb:5.011683425007504 -spec/services/case_remove_pit_extension_service_spec.rb:1.3335009079892188 -spec/services/data_request_update_service_spec.rb:0.805663225997705 -spec/services/deadline_calculator/calendar_days_spec.rb:20.463631891994737 -spec/services/notify_new_assignment_servcie_spec.rb:0.2968683829967631 -spec/services/retention_schedules/add_shedule_service_spec.rb:22.79195302199514 -spec/services/stats/case_selector_spec.rb:10.02265853600693 -spec/services/stats/etl/closed_cases_spec.rb:1.0184877199935727 -spec/services/stats/etl/offender_sar_complaint_closed_cases_spec.rb:3.8607768729998497 -spec/services/team_move_service_spec.rb:23.068572586998926 -spec/state_machines/configurable_state_machine/invalid_event_error_spec.rb:0.20483006900758483 -spec/state_machines/workflows/foi_permitted_events/full_approval_spec.rb:24.283908821002115 -spec/state_machines/workflows/foi_permitted_events/standard_spec.rb:6.4014144179964205 -spec/views/cases/attachments/new_html_slim_spec.rb:0.7193724389944691 -spec/views/cases/closable/respond_html_slim_spec.rb:0.21461848499893676 -spec/views/cases/responses/upload_response_and_approve_html_slim_spec.rb:1.7734244929888519 -spec/views/cases/sar/_close_form_html_slim_spec.rb:0.20684377099678386 -spec/views/cases/sar/_new_html_slim_spec.rb:0.0004015970043838024 -spec/views/cases/show_html_slim_spec.rb:14.49131775800197 -spec/views/layouts/_global_nav_html_slim_spec.rb:0.04072793100203853 -spec/views/teams/show_html_slim_spec.rb:2.1316326670057606 +spec/state_machines/ico_event_spec.rb:19.020617000060156 +spec/features/cases/offender_sar_complaint/case_closing_spec.rb:17.98283800005447 +spec/services/mark_response_as_sent_service_spec.rb:13.69093799998518 +spec/features/cases/foi/case_deleting_spec.rb:12.49151000007987 +spec/features/cases/sar_internal_review/case_creating_spec.rb:12.1026370000327 +spec/features/cases/sar/case_creating/creating_spec.rb:10.20981499995105 +spec/state_machines/workflows/predicates_spec.rb:7.35423900000751 +spec/services/case_filter/case_retention_deadline_filter_spec.rb:7.220305999973789 +spec/features/cases/foi/case_listing/pagination_spec.rb:6.778263000072911 +spec/features/cases/foi/case_viewing/viewing_spec.rb:6.143168000038713 +spec/services/case_filter/case_status_filter_spec.rb:6.122516999952495 +spec/features/cases/sar/case_deleting_spec.rb:6.067962999921292 +spec/services/case_filter/case_partial_case_flag_filter_spec.rb:6.0627060000551865 +spec/models/case_transition_spec.rb:5.968483000062406 +spec/services/stats/r207_offender_ico_complaint_monthly_performance_report_spec.rb:5.49953499995172 +spec/features/cases/offender_sar/case_search_spec.rb:5.494231000076979 +spec/services/case_filter/case_retention_state_filter_spec.rb:4.53633799997624 +spec/services/case_filter/timeliness_filter_spec.rb:3.99116000009235 +spec/services/case_require_further_action_service_spec.rb:3.901263000094332 +spec/controllers/cases/amendments_controller_spec.rb:3.8464880000101402 +spec/features/cases/offender_sar/sent_to_sscl_spec.rb:3.8397689999546856 +spec/features/cases/ico/case_creating/invalid_params_spec.rb:3.445973999914713 +spec/models/case_closure/exemption_spec.rb:2.966710999957286 +spec/views/users/show_html_slim_spec.rb:2.778630999964662 +spec/models/case/predicates_spec.rb:2.3614639999577776 +spec/features/common/feedback_spec.rb:2.3256429999601096 +spec/controllers/cases/icofoi_controller_spec.rb:2.174838999984786 +spec/services/current_team_and_user/ico/trigger_spec.rb:2.133706000051461 +spec/features/cases/foi/case_viewing/downloading_response_spec.rb:1.995197999989614 +spec/models/retention_schedule_spec.rb:1.5904480000026524 +spec/services/team_deletion_service_spec.rb:1.4510679999366403 +spec/controllers/admin/dashboard_controller_spec.rb:1.2976329999510199 +spec/models/letter_spec.rb:1.2843229999998584 +spec/views/cases/closable/close_html_slim_spec.rb:1.2528830000665039 +spec/features/cases/foi/case_extend_for_pit_spec.rb:0.9421100000618026 +spec/policies/case/sar/offender_complaint_policy_spec.rb:0.8395970000419766 +spec/routing/admin_routes_spec.rb:0.8288599998923019 +spec/models/builders/stepped_case_builder_spec.rb:0.7996850000927225 +spec/views/assignments/assign_to_team_member_spec.rb:0.6577399999368936 +spec/views/cases/offender_sar/_case_details_html_slim_spec.rb:0.6033840000163764 +spec/models/correspondence_type_spec.rb:0.5629119999939576 +spec/decorators/case/sar/internal_review_decorator_spec.rb:0.500878999941051 +spec/decorators/data_request_email_decorator_spec.rb:0.2454189999261871 +spec/views/cases/commissioning_documents/new_html_slim_spec.rb:0.18402100005187094 +spec/views/teams/join_teams_html_slim_spec.rb:0.18391100002918392 +spec/models/commissioning_document_template/mappa_spec.rb:0.1585330000380054 +spec/services/request_personal_information/data_v2_spec.rb:0.11246700002811849 +spec/models/case_closure/approval_flag/litigation_offender_complaint_spec.rb:0.07006300007924438 +spec/models/commissioning_document_template/prison_spec.rb:0.06686299992725253 +spec/models/reporting_period/calculator_spec.rb:0.05479000008199364 +spec/models/business_group_spec.rb:0.033513000002130866 +spec/models/reporting_period/year_to_date_spec.rb:0.02248299994971603 Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} -spec/controllers/cases/attachments_controller_spec.rb:3.9216642679966753 -spec/controllers/cases/commissioning_documents_controller_spec.rb:0.265786299991305 -spec/controllers/cases/overturned_ico_foi_controller_spec.rb:14.459972737997305 -spec/controllers/cases/responses_controller/upload_response_and_approve_spec.rb:4.935297137009911 -spec/controllers/cases/sar_controller_spec.rb:7.606951339999796 -spec/controllers/cases_controller/new_spec.rb:0.22576966499036644 -spec/controllers/passwords_controller_spec.rb:0.5484045339981094 -spec/controllers/stats_controller_spec.rb:2.309991075002472 -spec/decorators/case/offender_sar_decorator_spec.rb:0.14284473400039133 -spec/factory_specs/business_unit_factory_spec.rb:0.39394660100515466 -spec/factory_specs/overturned_ico_foi_factory_spec.rb:19.653552001997014 -spec/features/admin/cases/create_overturned_sar_spec.rb:4.657549741998082 -spec/features/admin/deactivating_users_spec.rb:5.74703637699713 -spec/features/cases/foi/case_assignment_responding_spec.rb:5.156687024995335 -spec/features/cases/foi/case_filtering_spec.rb:9.433520785998553 -spec/features/cases/foi/case_viewing/message_notifications_spec.rb:2.3501380560046528 -spec/features/cases/foi/case_viewing/viewing_spec.rb:4.633756461000303 -spec/features/cases/ico/case_creating/invalid_params_spec.rb:3.076809200007119 -spec/features/cases/ico/editing_case_spec.rb:36.621416370995576 -spec/features/cases/ico/reassign_ico_spec.rb:8.217180155988899 -spec/features/cases/ico/require_further_action_ico_sar_spec.rb:24.357043338997755 -spec/features/cases/ico/upload_response_spec.rb:5.899751068005571 -spec/features/cases/offender_sar_complaint/add_data_requests_spec.rb:14.1262834030058 -spec/features/cases/offender_sar_complaint/case_editing_spec.rb:81.65598859199963 -spec/features/cases/offender_sar_complaint/generate_acknowledgement_letter_spec.rb:3.994736752996687 -spec/features/cases/overturned_foi/case_closing_spec.rb:42.11044525098987 -spec/features/cases/sar/case_creating/creating_spec.rb:12.038652019007714 -spec/features/cases/sar/case_responses_spec.rb:6.310561295002117 -spec/features/cases/sar_internal_review/case_editing_spec.rb:21.864959315993474 -spec/features/common/sign_out_spec.rb:0.6174145240074722 -spec/forms/base_form_object_spec.rb:0.01667139001074247 -spec/lib/cts/cases/create_spec.rb:0.33457074699981604 -spec/lib/extensions/enumerable_spec.rb:0.009330070010037161 -spec/models/case/foi/standard_spec.rb:17.47133971299627 -spec/models/case/overturned_ico/foi_spec.rb:8.649597534007626 -spec/models/case/sar/offender_complaint_spec.rb:23.77390268399904 -spec/models/case_attachment_spec.rb:2.8045073529938236 -spec/models/case_closure/offender_complaint_appeal_outcome_spec.rb:0.07827561399608385 -spec/models/case_closure/offender_complaint_outcome_spec.rb:0.0780785209935857 -spec/models/commissioning_document_template/telephone_spec.rb:0.07225273200310767 -spec/models/concerns/draft_timeliness_spec.rb:2.6231491420039674 -spec/models/query/case_report_spec.rb:6.67674863000866 -spec/models/reporting_period/last_month_spec.rb:0.003227465000236407 -spec/models/reporting_period/year_to_date_spec.rb:0.005946299992501736 -spec/policies/cases/sar/offender_policy_spec.rb:0.2720083179883659 -spec/routing/cases_routes_spec.rb:0.5736720610002521 -spec/services/case_filter/case_high_profile_filter_spec.rb:6.065707821995602 -spec/services/case_filter/caseworker_filter_spec.rb:4.910887101999833 -spec/services/case_finder_service_spec.rb:23.982425663009053 -spec/services/case_search_service_spec.rb:18.635360269996454 -spec/services/case_unflag_for_clearance_service_spec.rb:1.4843868070020108 -spec/services/case_updater_service_spec.rb:1.5292172629997367 -spec/services/stats/r103_sar_business_unit_performace_report_spec.rb:5.545396047004033 -spec/services/stats/r401_offender_sar_closed_cases_report_spec.rb:2.2667300239991164 -spec/services/stats/r900_cases_report_spec.rb:3.3181483789958293 -spec/state_machines/overturned_foi_event_spec.rb:2.3206498839863343 -spec/state_machines/workflows/offender_sar_complaint_permitted_events/ico_spec.rb:3.95479150400206 -spec/views/cases/clearances/_clearance_levels_html_slim_spec.rb:3.000012014003005 -spec/views/cases/closable/close_html_slim_spec.rb:0.8992017380078323 -spec/views/cases/ico/_case_details_html_slim_spec.rb:6.398708780994639 -spec/views/cases/ico/_ico_final_decision_html_slim_spec.rb:5.557605863010394 -spec/views/cases/links/new_spec.rb:0.06943472501006909 -spec/views/cases/overturned_foi/_case_details_html_slim_spec.rb:9.022798385994975 -spec/views/cases/overturned_shared/new_html_slim_spec.rb:2.205639104009606 -spec/views/layouts/_header_html_slim_spec.rb:0.02477755499421619 -spec/views/teams/update_business_group_html_slim_spec.rb:0.13171258999500424 +spec/features/cases/offender_sar_complaint/case_editing_spec.rb:53.133965000044554 +spec/features/cases/filters/timeliness_spec.rb:45.853046000003815 +spec/features/cases/ico/editing_case_spec.rb:41.07956899993587 +spec/features/user_journeys/foi/non_trigger_e2e_spec.rb:17.22191200009547 +spec/features/cases/offender_sar_complaint/add_data_requests_spec.rb:16.982901999959722 +spec/features/user_journeys/sar/non_trigger_spec.rb:15.34774999995716 +spec/features/cases/foi/case_viewing/removing_response_spec.rb:12.258752999943681 +spec/features/cases/sar_internal_review/case_editing_spec.rb:12.042583999922499 +spec/services/case_finder_service_spec.rb:12.01887600007467 +spec/features/cases/offender_sar_complaint/case_search_spec.rb:9.31749199994374 +spec/services/case_search_service_spec.rb:7.6517580000218 +spec/state_machines/configurable_state_machine/machine_spec.rb:6.959768999950029 +spec/models/user_spec.rb:5.403935999958776 +spec/views/cases/overturned_sar/_case_details_html_slim_spec.rb:5.382651000050828 +spec/features/cases/sar/case_filtering_spec.rb:5.121796000050381 +spec/validators/closed_case_validator_spec.rb:4.665277999942191 +spec/services/case_filter/case_complaint_subtype_filter_spec.rb:4.283974000019953 +spec/services/case_approval_service_spec.rb:4.254779999959283 +spec/controllers/users_controller_spec.rb:4.019017999991775 +spec/services/next_step_info_spec.rb:3.7962919999845326 +spec/services/response_uploader_service_spec.rb:3.6757379999617115 +spec/services/case_filter/case_complaint_type_filter_spec.rb:3.593250000034459 +spec/features/cases/foi/case_listing/open_cases_spec.rb:3.173005999997258 +spec/features/cases/sar_internal_review/case_filtering_spec.rb:2.554151999996975 +spec/controllers/cases/attachments_controller_spec.rb:2.3807590000797063 +spec/services/retention_schedules_update_service_spec.rb:2.1954639999894425 +spec/services/s3_uploader_spec.rb:2.04773699992802 +spec/services/stats/r402_offender_sar_complaint_closed_cases_report_spec.rb:1.9151550000533462 +spec/controllers/cases_controller/destroy_spec.rb:1.8240920000243932 +spec/state_machines/workflows/sar_permitted_events/sar_standard_spec.rb:1.6505340000148863 +spec/features/cases/foi/case_viewing_spec.rb:1.5159249999560416 +spec/views/cases/filters/closed_cases_html_slim_spec.rb:1.0699150000000373 +spec/services/case_assign_responder_service_spec.rb:0.969457000028342 +spec/views/teams/show_html_slim_spec.rb:0.9381979999598116 +spec/features/common/homepage_navigation_spec.rb:0.8841320000356063 +spec/services/case_unflag_for_clearance_service_spec.rb:0.7007930000545457 +spec/models/team_correspondence_type_role_spec.rb:0.581304999999702 +spec/features/user_journeys/foi/managing_business_unit_spec.rb:0.39634999993722886 +spec/features/common/password_spec.rb:0.34898400004021823 +spec/decorators/case_extend_for_pit_decorator_spec.rb:0.34536999999545515 +spec/views/cases/foi/edit_html_slim_spec.rb:0.2588849999010563 +spec/services/data_request_create_service_spec.rb:0.25740300002507865 +spec/controllers/cases_controller/permitted_correspondence_types_spec.rb:0.1815570000326261 +spec/jobs/warehouse/purge_reports_job_spec.rb:0.1761350000742823 +spec/features/common/sign_out_spec.rb:0.1625409999396652 +spec/views/cases/closable/respond_html_slim_spec.rb:0.1523259999230504 +spec/decorators/contact_decorator_spec.rb:0.1460010000737384 +spec/policies/case/sar/offender_policy_spec.rb:0.11964500008616596 +spec/views/teams/index_html_slim_spec.rb:0.08436099998652935 +spec/views/admin/users/index_html_slim_spec.rb:0.0834380000596866 +spec/views/stats/index_html_slim_spec.rb:0.05930099997203797 +spec/models/commissioning_document_template/telephone_spec.rb:0.0354700000025332 +spec/services/request_personal_information/data_spec.rb:0.033811000059358776 +spec/models/case_closure/refusal_reason_spec.rb:0.020637000096030533 +spec/views/cases/_case_history_html_slim_spec.rb:0.013429999933578074 +spec/models/directorate_spec.rb:0.010974999982863665 +spec/lib/feature_set_spec.rb:0.008757999981753528 +spec/models/singular_spec.rb:0.002687999978661537 Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} -spec/controllers/admin/dashboard_controller_spec.rb:1.9522319229872664 -spec/controllers/cases/cover_pages_controller_spec.rb:0.29254795699671376 -spec/controllers/cases/links_controller_spec.rb:2.719908839004347 -spec/decorators/case/base_decorator_spec.rb:16.568390019994695 -spec/decorators/case_extend_sar_deadline_decorator_spec.rb:0.28760573398903944 -spec/decorators/foi_timeliness_review_spec.rb:0.05560472799697891 -spec/features/cases/filters/external_deadline_spec.rb:254.90646576900326 -spec/features/cases/foi/case_approvals/press_office_approvals_spec.rb:15.991936617007013 -spec/features/cases/ico/ico_approval_spec.rb:19.732591908003087 -spec/features/cases/offender_sar/preview_cover_page_spec.rb:0.9507097189925844 -spec/features/cases/offender_sar_complaint/adding_note_to_case_history_spec.rb:1.6443328379973536 -spec/features/contacts/contacts_spec.rb:18.56138284401095 -spec/jobs/warehouse/case_sync_job_spec.rb:0.14847068199014757 -spec/lib/papertrail_spec.rb:0.3523094339907402 -spec/models/business_group_spec.rb:0.024887433988624252 -spec/models/case/ico/sar_spec.rb:3.8355400940054096 -spec/models/case/sar_spec.rb:4.091046033994644 -spec/models/case_attachment_upload_group_collection_spec.rb:2.29315086499264 -spec/models/case_closure/exemption_spec.rb:0.12906513799680397 -spec/models/case_closure/info_held_status_spec.rb:0.04942147299880162 -spec/models/commissioning_document_template/mappa_spec.rb:0.06992483700742014 -spec/models/commissioning_document_template/pdp_spec.rb:0.07085376800387166 -spec/models/correspondence_type_spec.rb:0.40280255700054113 -spec/models/linked_case_spec.rb:2.0804893500026083 -spec/models/reporting_period/last_quarter_spec.rb:0.003417152998736128 -spec/models/warehouse/case_report_spec.rb:23.962788973003626 -spec/services/case_accept_approver_assignment_service_spec.rb:2.0183017300005304 -spec/services/case_approval_service_spec.rb:10.643296822992852 -spec/services/case_assign_responder_service_spec.rb:2.467851100998814 -spec/services/case_filter/external_deadline_filter_spec.rb:3.226087261005887 -spec/services/case_filter/internal_deadline_filter_spec.rb:3.3527994450123515 -spec/services/case_filter/received_date_filter_spec.rb:3.203686195993214 -spec/services/case_linking_service_spec.rb:8.99597987299785 -spec/services/case_remove_sar_deadline_extension_service_spec.rb:1.3246429529972374 -spec/services/case_update_partial_flags_service_spec.rb:1.0436132149916375 -spec/services/complaint_case_updater_service_spec.rb:1.6500699880125467 -spec/services/current_team_and_user/sar/offender_spec.rb:1.3725454289960908 -spec/services/directorate_move_service_spec.rb:27.805598292994546 -spec/services/global_nav_manager/page_spec.rb:0.8957531589985592 -spec/services/next_step_info_spec.rb:9.044261853996431 -spec/services/request_further_clearance_service_spec.rb:4.524784505003481 -spec/services/stats/base_monthly_performance_report_spec.rb:1.6258641609892948 -spec/services/stats/r002_appeals_performance_report_spec.rb:19.75841568299802 -spec/services/stats/r402_offender_sar_complaint_closed_cases_report_spec.rb:2.8140779770037625 -spec/services/team_join_service_spec.rb:14.479036755001289 -spec/state_machines/configurable_state_machine/config_validator_spec.rb:0.18796398199629039 -spec/state_machines/configurable_state_machine/duplicate_key_detector_spec.rb:0.006539780006278306 -spec/state_machines/configurable_state_machine/machine_spec.rb:6.904334178005229 -spec/state_machines/configurable_state_machine/manager_spec.rb:0.0606132399989292 -spec/state_machines/workflows/foi_permitted_events/trigger_spec.rb:10.051972107001347 -spec/state_machines/workflows/sar_permitted_events/sar_trigger_spec.rb:7.091795328000444 -spec/views/assignments/assign_to_team_member_spec.rb:0.29652007098775357 -spec/views/assignments/new_page_spec.rb:0.549666172999423 -spec/views/cases/_case_request_html_slim_spec.rb:0.7886265330016613 -spec/views/cases/_take_case_on_or_de_escalate_spec.rb:0.41799150600854773 -spec/views/cases/closable/closure_outcomes_html_slim_spec.rb:2.2992969259939855 -spec/views/cases/cover_pages/show_html_slim_spec.rb:0.051193444000091404 -spec/views/cases/data_requests/edit_html_slim_spec.rb:0.0769554930011509 -spec/views/cases/filters/incoming_cases_html_slim_spec.rb:2.50137769599678 -spec/views/cases/foi/edit_html_slim_spec.rb:0.36392414099827874 -spec/views/stats/index_html_slim_spec.rb:0.04824005099362694 -spec/views/teams/edit_html_slim_spec.rb:0.35488985900883563 -spec/views/teams/new_html_slim_spec.rb:0.2553752059902763 -spec/views/teams/update_directorate_html_slim_spec.rb:0.16094385700125713 -spec/views/users/new_html_slim_spec.rb:0.04172292200382799 -spec/views/users/show_html_slim_spec.rb:2.4604225759976543 +spec/state_machines/workflows/overturned_foi_permitted_events/full_approval_spec.rb:40.118436000077054 +spec/features/cases/overturned_foi/case_closing_spec.rb:39.86171199998353 +spec/models/case/base_spec.rb:35.216439999989234 +spec/features/user_journeys/overturned_foi/ovt_foi_non_trigger_e2e_spec.rb:23.53281700005755 +spec/features/cases/foi/case_approvals/disclosure_specialist_approval_spec.rb:19.85143500007689 +spec/state_machines/workflows/ico_permitted_events_spec/ico_appeal_trigger_spec.rb:19.322624000022188 +spec/features/cases/offender_sar/case_closing_spec.rb:16.676473999978043 +spec/controllers/cases_controller/show_spec.rb:13.631913999910466 +spec/policies/case/overturned_ico/foi_policy_spec.rb:11.645993000012822 +spec/services/case_unaccept_approver_assignment_service_spec.rb:9.884995999978855 +spec/views/cases/show_html_slim_spec.rb:9.616050999960862 +spec/features/cases/foi/case_approvals/private_office_approvals_spec.rb:9.174105999991298 +spec/factory_specs/fois_spec.rb:7.840715000056662 +spec/features/cases/retention_schedules/interaction_spec.rb:7.664974999963306 +spec/features/user_journeys/foi/downloading_stats_spec.rb:6.705629999982193 +spec/services/case_filter/open_case_status_filter_spec.rb:6.5000010000076145 +spec/services/stats/r103_sar_business_unit_performace_report_spec.rb:5.650880999979563 +spec/state_machines/workflows/foi_permitted_events/standard_spec.rb:5.130825000000186 +spec/services/stats/r502_offender_sar_complaint_retention_report_spec.rb:4.823094999999739 +spec/features/cases/retention_schedules/anonymisation_spec.rb:4.07953699992504 +spec/features/cases/sar/case_viewing_spec.rb:3.7681459999876097 +spec/features/cases/offender_sar_complaint/case_assign_responder_spec.rb:3.6950250000227243 +spec/services/stats/r105_sar_monthly_performance_report_spec.rb:3.574436999973841 +spec/views/cases/filters/index_html_slim_spec.rb:3.380890999920666 +spec/features/cases/foi/case_send_back_spec.rb:3.23589999997057 +spec/features/cases/foi/case_request_further_clearance_spec.rb:2.585852999938652 +spec/services/stats/r401_offender_sar_closed_cases_report_spec.rb:2.378878999967128 +spec/views/cases/filters/incoming_cases_html_slim_spec.rb:2.1729070000583306 +spec/models/case/sar/standard_spec.rb:1.9427439999999478 +spec/services/case_assign_to_team_member_service_spec.rb:1.6241539999609813 +spec/features/cases/foi/case_reassign_team_spec.rb:1.484171999967657 +spec/features/common/primary_navigation_spec.rb:1.3734460000414401 +spec/state_machines/overturned_foi_event_spec.rb:1.3676630000118166 +spec/controllers/assignments_controller/reassign_user_spec.rb:1.0423550000414252 +spec/models/team_spec.rb:1.005892000044696 +spec/decorators/data_request_decorator_spec.rb:0.9340379999484867 +spec/services/update_closure_service_spec.rb:0.85577399993781 +spec/services/current_team_and_user/sar/offender_spec.rb:0.6798999999882653 +spec/policies/team_policy_spec.rb:0.5716830000746995 +spec/views/cases/_case_request_html_slim_spec.rb:0.5359869999811053 +spec/services/case_deletion_service_spec.rb:0.5233200000366196 +spec/views/assignments/new_page_spec.rb:0.3843949999427423 +spec/services/case_validate_rejected_offender_sar_service_spec.rb:0.3620159999700263 +spec/jobs/search_index_bu_name_updater_job_spec.rb:0.31804600008763373 +spec/controllers/cases_controller/new_spec.rb:0.214579000021331 +spec/views/cases/sar/edit_html_slim_spec.rb:0.19678999995812774 +spec/controllers/omniauth_callbacks_controller_spec.rb:0.12181000004056841 +spec/services/notify_new_assignment_service_spec.rb:0.11806699994485825 +spec/controllers/admin/users_controller_spec.rb:0.10038700001314282 +spec/controllers/rpi_controller_spec.rb:0.08254600001964718 +spec/models/teams_users_role_spec.rb:0.07707799994386733 +spec/views/cases/data_requests/new_html_slim_spec.rb:0.05036399990785867 +spec/jobs/email_status_job_spec.rb:0.0318840000545606 +spec/models/commissioning_document_template/pdp_spec.rb:0.029304000083357096 +spec/models/team_property_spec.rb:0.014883000054396689 +spec/models/category_reference_spec.rb:0.007877999916672707 +spec/jobs/pdf_maker_job_spec.rb:0.007822999963536859 +spec/models/concerns/searchable_spec.rb:0.006227000034414232 +spec/features/admin/cases/adding_cases_spec.rb:0.0020279999589547515 Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} -spec/controllers/assignments_controller/assign_to_team_spec.rb:2.4558553590031806 -spec/controllers/cases/notes_controller_spec.rb:0.5278715009917505 -spec/controllers/cases/offender_sar_controller_spec.rb:9.431134527010727 -spec/controllers/cases/responses_controller/upload_responses_spec.rb:3.5160733189986786 -spec/controllers/cases_controller/confirm_destroy_spec.rb:0.6109831200010376 -spec/controllers/cases_controller_spec.rb:15.183403742994415 -spec/decorators/case/overturned_ico/base_decorator_spec.rb:3.599598763990798 -spec/decorators/case/sar/sar_internal_review_decorator_spec.rb:0.37843854899983853 -spec/decorators/case_link_decorator_spec.rb:0.06008372899668757 -spec/decorators/case_transition_decorator_spec.rb:3.479962213008548 -spec/decorators/correspondence_type_decorator_spec.rb:0.016706645998056047 -spec/features/admin/cases/create_overturned_foi_spec.rb:4.9345807589998 -spec/features/cases/foi/case_approvals/disclosure_specialist_approval_spec.rb:22.739980377999018 -spec/features/cases/foi/case_responding/mark_as_sent_spec.rb:5.209193162998417 -spec/features/cases/foi/case_viewing/viewing_response_details_spec.rb:3.665051575997495 -spec/features/cases/ico/delete_ico_spec.rb:3.5772445580078056 -spec/features/cases/offender_sar/case_editing_spec.rb:22.905804389010882 -spec/features/cases/offender_sar_complaint/preview_cover_page_spec.rb:1.3623199100111378 -spec/features/cases/overturned_foi/accept_and_reject_spec.rb:20.113988663011696 -spec/features/cases/overturned_foi/create_case_spec.rb:6.840282094999566 -spec/features/cases/sar/case_viewing_spec.rb:5.139911046993802 -spec/features/cases/sar/editing_closure_details_spec.rb:3.300546078986372 -spec/features/cases/sar_internal_review/case_creating_spec.rb:17.082217477000086 -spec/features/user_journeys/foi/compliance_review_trigger_e2e_spec.rb:52.80938982000225 -spec/features/user_journeys/foi/non_trigger_e2e_spec.rb:27.713403547997586 -spec/features/user_journeys/overturned_foi/ovt_foi_non_trigger_e2e_spec.rb:29.96388496599684 -spec/features/user_journeys/sar/trigger_spec.rb:40.19979737100948 -spec/jobs/pdf_maker_job_spec.rb:0.013169853002182208 -spec/jobs/search_index_bu_name_updater_job_spec.rb:0.47116128700145055 -spec/lib/cts/cases/cli_spec.rb:2.595684012005222 -spec/models/builders/stepped_case_builder_spec.rb:0.6515082529949723 -spec/models/case/sar/internal_review_spec.rb:6.067477149001206 -spec/models/case_closure/approval_flag/ico_offender_complaint_spec.rb:0.06927679399086628 -spec/models/case_closure/refusal_reason_spec.rb:0.03632756999286357 -spec/models/case_extensions_spec.rb:4.416734744998394 -spec/models/case_number_counter_spec.rb:0.026641604999895208 -spec/models/commissioning_document_template/cctv_spec.rb:0.07031401499989443 -spec/models/report_spec.rb:0.2917360580031527 -spec/models/search_query_spec.rb:18.55913314600184 -spec/models/team_spec.rb:2.909859380000853 -spec/models/user_spec.rb:11.890325295986258 -spec/policies/cases/base_policy_spec.rb:17.258252319006715 -spec/policies/cases/overturned_ico/sar_policy_spec.rb:16.584569521000958 -spec/policies/cases/standard_policy_spec.rb:17.708173974999227 -spec/presenters/retention_schedule_case_note_spec.rb:0.01776439099921845 -spec/services/case_filter/case_complaint_priority_filter_spec.rb:6.008043035995797 -spec/services/case_filter/case_status_filter_spec.rb:8.561589138000272 -spec/services/case_flag_for_clearance_service_spec.rb:13.230718951992458 -spec/services/case_reopen_service_spec.rb:2.41606719000265 -spec/services/case_unaccept_approver_assignment_service_spec.rb:21.162821789999725 -spec/services/current_team_and_user/ico/trigger_spec.rb:2.6642162959906273 -spec/services/mark_response_as_sent_service_spec.rb:15.446175662989845 -spec/services/state_selector_spec.rb:0.011637994000921026 -spec/services/stats/r102_sar_appeals_performance_report_spec.rb:21.607787846995052 -spec/services/stats/r205_offender_sar_monthly_performance_report_spec.rb:2.3124403419933515 -spec/services/stats/stats_collector_spec.rb:0.011943703997530974 -spec/services/team_deletion_service_spec.rb:1.490974552987609 -spec/services/team_finder_service_spec.rb:3.469406051997794 -spec/state_machines/workflows/hooks_spec.rb:1.5250213440012885 -spec/state_machines/workflows/ico_permitted_events_spec/ico_appeal_trigger_spec.rb:24.781617747008568 -spec/validators/responded_case_validator_spec.rb:1.361544061001041 -spec/views/cases/closable/edit_closure_html_slim_spec.rb:0.18428148300154135 -spec/views/cases/confirm_destroy_html_slim_spec.rb:0.2192433939926559 -spec/views/cases/filters/closed_cases_html_slim_spec.rb:1.4914570889959577 -spec/views/cases/ico/edit_html_slim_spec.rb:0.7839062749990262 -spec/views/cases/offender_sar/_case_details_html_slim_spec.rb:0.20645616699766833 +spec/features/user_journeys/ico/trigger_e2e_journey_spec.rb:47.34891299996525 +spec/services/stats/r004_cabinet_office_report_spec.rb:42.35148499999195 +spec/state_machines/workflows/overturned_foi_permitted_events/trigger_spec.rb:22.322922999970615 +spec/features/contacts/contacts_spec.rb:21.51850900007412 +spec/controllers/cases/foi_controller_spec.rb:18.484719999949448 +spec/features/cases/ico/require_further_action_ico_foi_spec.rb:16.850016999989748 +spec/features/cases/ico/editing_case_closure_spec.rb:14.490717999986373 +spec/services/stats/r002_appeals_performance_report_spec.rb:14.226798000046983 +spec/decorators/case/base_decorator_spec.rb:13.426387000014074 +spec/services/user_deletion_service_spec.rb:11.282273999997415 +spec/features/cases/sar_internal_review/case_closing_spec.rb:10.55154500005301 +spec/models/case/sar/offender_complaint_spec.rb:10.360064000007696 +spec/services/retention_schedules/add_schedule_service_spec.rb:9.93889400002081 +spec/features/admin/deactivating_users_spec.rb:9.86496499995701 +spec/models/business_unit_spec.rb:8.767952000023797 +spec/models/case/ico/base_spec.rb:8.523784999968484 +spec/features/cases/ico/reassign_ico_spec.rb:6.264730000053532 +spec/services/new_overturned_ico_case_service_spec.rb:5.292737000039779 +spec/features/cases/foi/case_responding/mark_as_sent_spec.rb:5.054197999997996 +spec/services/stats/case_selector_spec.rb:4.744891999987885 +spec/decorators/case_transition_decorator_spec.rb:4.142634999938309 +spec/models/case/overturned_ico/base_spec.rb:4.073340000002645 +spec/services/stats/r901_offender_sar_cases_report_spec.rb:2.967071000020951 +spec/controllers/cases/data_requests_controller_spec.rb:2.8110970000270754 +spec/views/cases/_case_attachments_html_slim_spec.rb:2.2800740000093356 +spec/models/case/ico/sar_spec.rb:2.2404910000041127 +spec/models/case_extensions_spec.rb:2.222723999992013 +spec/controllers/cases/sar_extensions_controller_spec.rb:2.065974000026472 +spec/services/stats/r900_cases_report_spec.rb:1.8206819999031723 +spec/services/commissioning_document_uploader_service_spec.rb:1.6828009999589995 +spec/models/case_attachment_spec.rb:1.4376049999846146 +spec/features/cases/foi/case_viewing/message_notifications_spec.rb:1.2053880000021309 +spec/models/cases_users_transitions_tracker_spec.rb:1.1844349999446422 +spec/services/deadline_calculator/calendar_months_spec.rb:1.0343110000248998 +spec/services/stats/r007_closed_cases_report_spec.rb:0.8919900000328198 +spec/services/case_accept_approver_assignment_service_spec.rb:0.8113920000614598 +spec/views/cases/searches/show_spec.rb:0.7561970000388101 +spec/decorators/case/sar/offender_decorator_spec.rb:0.5143770000431687 +spec/services/case_remove_pit_extension_service_spec.rb:0.48103100003208965 +spec/views/cases/data_requests/show_html_slim_spec.rb:0.38524600001983345 +spec/controllers/cases_controller/confirm_destroy_spec.rb:0.37181399995461106 +spec/factory_specs/business_unit_factory_spec.rb:0.29262299998663366 +spec/routing/cases_routes_spec.rb:0.23518700001295656 +spec/policies/case/ico/foi_policy_spec.rb:0.1938660000450909 +spec/views/cases/sar/_close_form_html_slim_spec.rb:0.17675900005269796 +spec/views/cases/confirm_destroy_html_slim_spec.rb:0.17236299999058247 +spec/jobs/warehouse/case_sync_job_spec.rb:0.15919000003486872 +spec/jobs/warehouse/closed_cases_create_job_spec.rb:0.06559899996500462 +spec/forms/retention_schedule_form_spec.rb:0.06509200006257743 +spec/decorators/case/foi/compliance_review_decorator_spec.rb:0.06497900001704693 +spec/views/cases/_case_status_html_slim_spec.rb:0.05984100000932813 +spec/views/cases/commissioning_documents/edit_html_slim_spec.rb:0.05226700007915497 +spec/controllers/api/rpi_controller_spec.rb:0.04150900000240654 +spec/controllers/pages_controller_spec.rb:0.021038000006228685 +spec/models/commissioning_document_template/base_spec.rb:0.02057799999602139 +spec/services/bypass_params_manager_spec.rb:0.005730999982915819 +spec/services/csv_generator_spec.rb:0.004329000017605722 +spec/features/admin/cases/create_overturned_foi_spec.rb:0.0002899999963119626 Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} -spec/controllers/admin/users_controller_spec.rb:0.11365240599843673 -spec/controllers/assignments_controller/execute_assign_to_team_member_spec.rb:1.777191755012609 -spec/controllers/assignments_controller/new_spec.rb:2.0219113009952707 -spec/controllers/cases/filters_controller/state_filter_spec.rb:0.5477641749894246 -spec/controllers/cases/ico_controller_spec.rb:45.38363734599261 -spec/controllers/cases/sar_extensions_controller_spec.rb:2.2527004059957108 -spec/controllers/cases/sar_internal_review_controller_spec.rb:0.2920559240010334 -spec/controllers/cases/searches_controller_spec.rb:2.6712870719929924 -spec/controllers/cases_controller/destroy_spec.rb:2.0247243699996034 -spec/controllers/cases_controller/show_spec.rb:15.858397080999566 -spec/controllers/omniauth_callbacks_controller_spec.rb:0.1383661790023325 -spec/controllers/users_controller_spec.rb:4.532027709996328 -spec/decorators/case/overturned_ico/sar_decorator_spec.rb:0.6589254950085888 -spec/decorators/data_request_decorator_spec.rb:0.20852863599429838 -spec/features/cases/filters/timeliness_spec.rb:43.35835646599298 -spec/features/cases/foi/case_deleting_spec.rb:7.499902115989244 -spec/features/cases/foi/case_reassign_user/reassign_user_spec.rb:10.988600832002703 -spec/features/cases/foi/link_a_case_spec.rb:6.253539732002537 -spec/features/cases/offender_sar/case_closing_spec.rb:17.932357302008313 -spec/features/cases/offender_sar/case_search_spec.rb:10.544828836995293 -spec/features/cases/offender_sar/case_viewing_spec.rb:1.117723566989298 -spec/features/cases/offender_sar_complaint/case_creating_spec.rb:138.9913215560082 -spec/features/cases/offender_sar_complaint/case_search_spec.rb:19.87567627298995 -spec/features/cases/overturned_foi/upload_response_spec.rb:8.429926103999605 -spec/features/cases/retention_schedules/interaction_spec.rb:13.262195464994875 -spec/features/cases/sar/editing_case_spec.rb:7.292201837000903 -spec/form_models/sar_internal_review_case_form_spec.rb:0.7976863439980661 -spec/helpers/assignments_helper_spec.rb:1.3469193499913672 -spec/helpers/teams_helper_spec.rb:1.9812125850003213 -spec/jobs/warehouse/closed_cases_create_job_spec.rb:0.09157833999779541 -spec/mailers/action_notifications_mailer_spec.rb:19.664370088998112 -spec/models/case/ico/foi_spec.rb:5.076711988993338 -spec/models/case/overturned_ico/sar_spec.rb:10.423128957001609 -spec/models/case/sar/offender_spec.rb:5.083868386995164 -spec/models/case_closure/approval_flag/litigation_offender_complaint_spec.rb:0.05893392500001937 -spec/models/commissioning_document_template/cross_border_spec.rb:0.06974104199616704 -spec/models/team_correspondence_type_role_spec.rb:1.1498861650034087 -spec/models/team_property_spec.rb:0.033752571005607024 -spec/policies/base_policy_scope_spec.rb:5.593562108988408 -spec/policies/cases/ico/sar_policy_spec.rb:0.4317783630103804 -spec/routing/application_routes_spec.rb:0.4007622770004673 -spec/routing/filters_routes_spec.rb:0.02465398899221327 -spec/services/assign_new_team_service_spec.rb:4.831940431002295 -spec/services/case_assign_to_team_member_service_spec.rb:3.357297928989283 -spec/services/case_extend_for_pit_service_spec.rb:4.270684118993813 -spec/services/case_filter/case_complaint_subtype_filter_spec.rb:8.453077685990138 -spec/services/case_filter/case_type_filter_spec.rb:16.099896102998173 -spec/services/case_team_collection_spec.rb:1.3955555119900964 -spec/services/data_request_create_service_spec.rb:0.5731218879955122 -spec/services/default_team_service_spec.rb:1.2639852749998681 -spec/services/s3_uploader_spec.rb:3.5730561209929874 -spec/services/stats/base_report_spec.rb:0.9508655179961352 -spec/services/stats/r206_offender_standard_complaint_monthly_performance_report_spec.rb:5.535782216000371 -spec/services/stats/r901_offender_sar_cases_report_spec.rb:4.068922014004784 -spec/services/stats/warehouse/case_report_sync_spec.rb:4.4270913249929436 -spec/services/user_active_case_count_service_spec.rb:4.646464977005962 -spec/services/user_deletion_service_spec.rb:11.30039901600685 -spec/state_machines/sar_event_spec.rb:5.690869288999238 -spec/state_machines/workflows/overturned_foi_permitted_events/full_approval_spec.rb:53.4573684210045 -spec/state_machines/workflows/sar_permitted_events/sar_standard_spec.rb:1.9198665389994858 -spec/validators/closed_case_validator_spec.rb:5.800985412992304 -spec/views/cases/filters/index_html_slim_spec.rb:3.9859366239979863 -spec/views/cases/new_html_slim_spec.rb:0.24936228500155266 -spec/views/cases/responses/upload_response_and_return_for_redraft_html_slim_spec.rb:1.0190421550069004 -spec/views/pages/accessibility.html.slim_spec.rb:0.07920696600922383 -spec/views/teams/index_html_slim_spec.rb:0.13461692100099754 +spec/features/cases/offender_sar_complaint/case_creating_spec.rb:90.00734100001864 +spec/models/warehouse/case_report_spec.rb:42.635130999959074 +spec/models/case/scopes_spec.rb:22.55073999997694 +spec/state_machines/workflows/overturned_foi_permitted_events/standard_spec.rb:17.453442999976687 +spec/services/stats/r102_sar_appeals_performance_report_spec.rb:15.849040000000969 +spec/features/cases/ico/ico_approval_spec.rb:13.620476000010967 +spec/controllers/cases_controller_spec.rb:13.583416000008583 +spec/models/search_query_spec.rb:10.168535999953747 +spec/services/case_create_service_spec.rb:9.903782000066712 +spec/state_machines/workflows/foi_permitted_events/trigger_spec.rb:8.946294000023045 +spec/state_machines/overturned_sar_event_spec.rb:8.781109999981709 +spec/models/assignment_spec.rb:7.618345999973826 +spec/services/retention_schedules/anonymise_case_service_spec.rb:6.801306999986991 +spec/state_machines/workflows/sar_internal_review_permitted_events/sar_internal_review_trigger_spec.rb:6.401655000052415 +spec/features/cases/foi/editing_case_spec.rb:6.1942990000825375 +spec/models/query/case_report_spec.rb:5.25711600005161 +spec/models/concerns/case_states_spec.rb:4.192365000024438 +spec/services/case_extend_sar_deadline_service_spec.rb:4.094768000068143 +spec/services/case_filter/caseworker_filter_spec.rb:3.8949220000067726 +spec/services/case_linking_service_spec.rb:3.769283000030555 +spec/models/case/sar/internal_review_spec.rb:3.643642000039108 +spec/features/cases/sar/case_assigning_new_team_spec.rb:3.278440999914892 +spec/services/stats/warehouse/case_report_sync_spec.rb:3.0225259999278933 +spec/features/admin/deactivating_teams_spec.rb:2.965059999958612 +spec/state_machines/workflows/offender_sar_complaint_permitted_events/litigation_spec.rb:2.850075999973342 +spec/features/cases/offender_sar/generate_acknowledgement_letter_spec.rb:2.7170069999992847 +spec/views/assignments/edit_page_spec.rb:2.0908950000302866 +spec/features/cases/sar/case_search_spec.rb:2.0656639999942854 +spec/views/cases/foi/_case_details_html_slim_spec.rb:1.7518479999853298 +spec/controllers/cases/pit_extensions_controller_spec.rb:1.7035000000614673 +spec/services/stats/r006_kilo_map_spec.rb:1.6770229999674484 +spec/controllers/assignments_controller/assign_to_team_member_spec.rb:1.6073580000083894 +spec/services/case_updater_service_spec.rb:1.1818040000507608 +spec/services/request_uploader_service_spec.rb:1.0606440000701696 +spec/decorators/case/overturned_ico/sar_decorator_spec.rb:1.0506989998975769 +spec/services/deadline_calculator/business_days_spec.rb:0.8755639999872074 +spec/views/cases/sar/_case_details_html_slim_spec.rb:0.8040370000526309 +spec/controllers/contacts_controller_spec.rb:0.6758550000376999 +spec/services/case_update_partial_flags_service_spec.rb:0.5572769999271259 +spec/decorators/case_extend_sar_deadline_decorator_spec.rb:0.4786679999670014 +spec/controllers/admin/cases_controller_spec.rb:0.3835229999385774 +spec/services/notify_responder_service_spec.rb:0.37902699992991984 +spec/controllers/devise/sessions_controller_spec.rb:0.35994200001005083 +spec/services/global_nav_manager/page_spec.rb:0.3364359999541193 +spec/decorators/case/ico/sar_decorator_spec.rb:0.17571700003463775 +spec/decorators/case/foi/timeliness_review_decorator_spec.rb:0.15238900005351752 +spec/models/commissioning_document_template/cross_border_spec.rb:0.11006500001531094 +spec/state_machines/configurable_state_machine/invalid_event_error_spec.rb:0.09328600007575005 +spec/views/teams/update_business_group_html_slim_spec.rb:0.06949499994516373 +spec/lib/host_env_spec.rb:0.059286999981850386 +spec/views/users/new_html_slim_spec.rb:0.04388899996411055 +spec/controllers/api/rpi_v2_controller_spec.rb:0.031016999972052872 +spec/jobs/performance_report_job_spec.rb:0.02410999999847263 +spec/views/layouts/_header_html_slim_spec.rb:0.023569000069983304 +spec/helpers/views_helper_spec.rb:0.018626000033691525 +spec/state_machines/configurable_state_machine/duplicate_key_detector_spec.rb:0.013090999913401902 +spec/services/request_personal_information/attachment_spec.rb:0.004535999963991344 Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} -spec/controllers/assignments_controller/reassign_user_spec.rb:1.9916493679920677 -spec/controllers/cases/filters_controller/filters_controller_spec.rb:4.41357753801276 -spec/controllers/cases/letters_controller_spec.rb:1.1061729520006338 -spec/controllers/cases/overturned_ico_sar_controller_spec.rb:18.942693146003876 -spec/controllers/cases/pit_extensions_controller_spec.rb:2.2474772770074196 -spec/controllers/cases/responses_controller/upload_response_and_return_for_redraft_spec.rb:3.4772933179920074 -spec/controllers/feedback_controller_spec.rb:0.07005732000106946 -spec/decorators/case/ico/sar_decorator_spec.rb:0.058854805000009947 -spec/decorators/case/overturned_ico/foi_decorator_spec.rb:1.9882849730056478 -spec/decorators/case_extend_for_pit_decorator_spec.rb:0.22889280099479947 -spec/decorators/user_decorator_spec.rb:0.6955282580020139 -spec/features/cases/foi/case_listing/open_cases_spec.rb:4.244588425004622 -spec/features/cases/foi/case_listing/pagination_spec.rb:6.84973449500103 -spec/features/cases/foi/case_responding/upload_response_spec.rb:6.347305675997632 -spec/features/cases/foi/case_viewing/downloading_response_spec.rb:2.0340357039967785 -spec/features/cases/foi/case_viewing_spec.rb:2.521677960990928 -spec/features/cases/foi/editing_case_closure_spec.rb:18.504371784001705 -spec/features/cases/ico/case_creating/creating_spec.rb:70.36005936599395 -spec/features/cases/ico/editing_case_closure_spec.rb:13.36471236300713 -spec/features/cases/offender_sar/generate_acknowledgement_letter_spec.rb:3.526534344011452 -spec/features/cases/offender_sar/log_data_received_spec.rb:4.322111720000976 -spec/features/cases/offender_sar/partial_case_flags_update_spec.rb:1.9745686509995721 -spec/features/cases/offender_sar_complaint/case_assign_responder_spec.rb:5.964149132007151 -spec/features/cases/offender_sar_complaint/log_data_received_spec.rb:4.804259890996036 -spec/features/cases/sar/case_extending_deadline_spec.rb:15.673266568992403 -spec/features/cases/sar_internal_review/editing_closure_details_spec.rb:4.330019999993965 -spec/features/user_journeys/foi/managing_business_unit_spec.rb:1.0582089939998696 -spec/i18n_spec.rb:20.599836868001148 -spec/jobs/warehouse/purge_reports_job_spec.rb:0.06258024499402381 -spec/models/assignment_spec.rb:13.727842360007344 -spec/models/case/base_spec.rb:54.65624341699004 -spec/models/case/ico/base_spec.rb:15.428005533991382 -spec/models/case/scopes_spec.rb:30.858259411004838 -spec/models/case_attachment_upload_group_spec.rb:2.784598899001139 -spec/models/case_transition_spec.rb:4.193615670010331 -spec/models/category_reference_spec.rb:0.03164001600816846 -spec/models/commissioning_document_template/security_spec.rb:0.0694054560008226 -spec/models/retention_schedule_spec.rb:1.032399734001956 -spec/policies/report_type_policy_spec.rb:2.475111998995999 -spec/policies/team_policy_spec.rb:1.3140658129996154 -spec/services/bypass_params_manager_spec.rb:0.01650033099576831 -spec/services/case_filter/case_retention_state_filter_spec.rb:5.882958525005961 -spec/services/case_filter/case_trigger_flag_filter_spec.rb:12.639318513000035 -spec/services/case_filter/date_responded_filter_spec.rb:3.2217760999919847 -spec/services/current_team_and_user_service_spec.rb:6.097657698002877 -spec/services/deadline_calculator/business_days_spec.rb:0.4568522370100254 -spec/services/stats/r004_cabinet_office_report_spec.rb:93.47005322600307 -spec/services/stats/r105_sar_monthly_performance_report_spec.rb:3.2529579139954876 -spec/state_machines/workflows/offender_sar_complaint_permitted_events/litigation_spec.rb:5.280304330997751 -spec/state_machines/workflows/offender_sar_complaint_permitted_events/standard_spec.rb:4.003404543997021 -spec/state_machines/workflows/overturned_foi_permitted_events/standard_spec.rb:26.946968438991462 -spec/state_machines/workflows/overturned_foi_permitted_events/trigger_spec.rb:33.3948585850012 -spec/state_machines/workflows/overturned_sar_permitted_events/standard_spec.rb:8.853264210993075 -spec/state_machines/workflows/overturned_sar_permitted_events/trigger_spec.rb:17.941118949005613 -spec/views/admin/users/index_html_slim_spec.rb:0.11636695700872224 -spec/views/cases/_case_history_html_slim_spec.rb:0.0139771409885725 -spec/views/cases/_case_status_html_slim_spec.rb:0.07586193799215835 -spec/views/cases/_linked_cases_html_slim_spec.rb:0.03280048799933866 -spec/views/cases/overturned_sar/_case_details_html_slim_spec.rb:7.548711605995777 -spec/views/cases/responses/upload_responses_html_slim_spec.rb:0.01832912898680661 -spec/views/cases/sar/_case_details_html_slim_spec.rb:1.427777185002924 -spec/views/cases/sar/edit_html_slim_spec.rb:0.2668472309887875 -spec/views/cases/searches/show_spec.rb:1.2211400929954834 -spec/views/shared/_dropzone_js_html_slim_spec.rb:0.048264192999340594 -spec/views/stats/new_slim_spec.rb:0.04705845199350733 +spec/features/cases/offender_sar_complaint/case_progressing_spec.rb:117.45980000006966 +spec/state_machines/foi_event_spec.rb:23.139416999998502 +spec/features/cases/offender_sar/case_progressing_spec.rb:19.23123699997086 +spec/features/cases/sar/sar_closing_spec.rb:16.87505999999121 +spec/controllers/cases/messages_controller_spec.rb:15.760163000086322 +spec/controllers/teams_controller_spec.rb:13.706119999988005 +spec/controllers/cases/clearances_controller_spec.rb:13.019977999967523 +spec/features/cases/foi/editing_case_closure_spec.rb:12.658135000034235 +spec/features/user_journeys/overturned_sar/non_trigger_spec.rb:12.470425999956205 +spec/features/cases/offender_sar/rejected_case_editing_spec.rb:11.697848999989219 +spec/features/cases/sar/case_approval_spec.rb:8.260766999912448 +spec/features/cases/foi/case_viewing/viewing_response_details_spec.rb:8.193276999983937 +spec/policies/case/base_policy_spec.rb:7.161926999920979 +spec/decorators/case/ico/base_decorator_spec.rb:6.400742999976501 +spec/features/cases/sar/case_extending_deadline_spec.rb:6.113692000042647 +spec/controllers/stats_controller_spec.rb:3.7982770000817254 +spec/state_machines/sar_event_spec.rb:3.767247000010684 +spec/services/user_active_case_count_service_spec.rb:3.484180000028573 +spec/views/cases/ico/_case_details_html_slim_spec.rb:3.312868000008166 +spec/features/cases/offender_sar/generate_commissioning_document_spec.rb:3.127550999983214 +spec/features/cases/ico/upload_response_spec.rb:3.0247590000508353 +spec/features/cases/sar_internal_review/editing_closure_details_spec.rb:2.9198409999953583 +spec/features/cases/offender_sar_complaint/case_viewing_spec.rb:2.6141039999201894 +spec/features/cases/offender_sar_complaint/generate_acknowledgement_letter_spec.rb:2.275999999954365 +spec/services/stats/etl/offender_sar_closed_cases_spec.rb:2.2581690000370145 +spec/models/case/ico/foi_spec.rb:1.898966999957338 +spec/services/case_filter/external_deadline_filter_spec.rb:1.5989239999325946 +spec/views/cases/clearances/_clearance_levels_html_slim_spec.rb:1.5706500000087544 +spec/services/case_filter/internal_deadline_filter_spec.rb:1.4611270000459626 +spec/services/commissioning_document_email_service_spec.rb:1.3773610000498593 +spec/controllers/assignments_controller/new_spec.rb:1.3633550000377 +spec/controllers/cases/filters_controller/open_spec.rb:1.2706379999872297 +spec/features/cases/offender_sar/case_viewing_spec.rb:1.0234700000146404 +spec/controllers/assignments_controller/execute_assign_to_team_member_spec.rb:1.003071999992244 +spec/form_models/offender_sar_complaint_case_form_spec.rb:0.991939999978058 +spec/views/cases/responses/upload_response_and_approve_html_slim_spec.rb:0.9188389999326319 +spec/controllers/cases/letters_controller_spec.rb:0.8765849999617785 +spec/views/cases/attachments/new_html_slim_spec.rb:0.7186220000730827 +spec/views/cases/clearances/_clearance_copy_html_slim_spec.rb:0.58271099999547 +spec/models/data_request_email_spec.rb:0.47035800002049655 +spec/controllers/cases/filters_controller/state_filter_spec.rb:0.34184300003107637 +spec/policies/user_policy_spec.rb:0.1856639999896288 +spec/lib/cts/cases/create_spec.rb:0.16774800000712276 +spec/policies/case/ico/sar_policy_spec.rb:0.1444469999987632 +spec/views/assignments/reassign_user_page_spec.rb:0.13618799997493625 +spec/decorators/case/sar/standard_decorator_spec.rb:0.09001500008162111 +spec/decorators/case/ico/foi_decorator_spec.rb:0.08911299996543676 +spec/views/cases/data_requests/probation_send_email_html_slim_spec.rb:0.0732709999429062 +spec/state_machines/configurable_state_machine/manager_spec.rb:0.0665840000147 +spec/mailers/devise_mailer_spec.rb:0.05863600003067404 +spec/views/shared/_dropzone_js_html_slim_spec.rb:0.05148400005418807 +spec/models/commissioning_document_template/cctv_spec.rb:0.03330799995455891 +spec/models/letter_template_spec.rb:0.029418000020086765 +spec/models/feedback_spec.rb:0.012727999943308532 +spec/services/global_nav_manager/tab_spec.rb:0.010567000019364059 +spec/routing/filters_routes_spec.rb:0.009997999994084239 +spec/i18n_spec.rb:0.0002880000974982977 Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} -spec/controllers/admin/cases_controller_spec.rb:0.12741153500974178 -spec/controllers/cases/offender_sar_complaint_controller_spec.rb:13.783476986995083 -spec/decorators/case/ico/base_decorator_spec.rb:7.695105204998981 -spec/decorators/case/ico/foi_decorator_spec.rb:0.13309114299772773 -spec/decorators/case/offender_sar_complaint_decorator_spec.rb:0.8055369600042468 -spec/factory_specs/fois_spec.rb:7.64543173299171 -spec/factory_specs/overturned_ico_sar_factory_spec.rb:7.1922802990011405 -spec/features/admin/deactivating_teams_spec.rb:2.3422394520166563 -spec/features/cases/foi/case_listing/incoming_cases_spec.rb:2.9994519769970793 -spec/features/cases/foi/case_reassign_team_spec.rb:1.5803400139993755 -spec/features/cases/foi/case_send_back_spec.rb:4.32372447499074 -spec/features/cases/foi/editing_case_spec.rb:7.245853786997031 -spec/features/cases/offender_sar/add_data_requests_spec.rb:6.938692872005049 -spec/features/cases/offender_sar_complaint/case_closing_spec.rb:18.690635440012557 -spec/features/cases/retention_schedules/anonymisation_spec.rb:3.6319697459985036 -spec/features/cases/sar/case_filtering_spec.rb:6.138851120995241 -spec/features/cases/sar/sar_closing_spec.rb:22.326887870003702 -spec/features/cases/search_filter_journeys_spec.rb:403.5528587089939 -spec/features/user_journeys/foi/trigger_e2e_spec.rb:56.997720710991416 -spec/features/user_journeys/overturned_foi/ovt_foi_trigger_e2e_spec.rb:0.24189664800360333 -spec/features/user_journeys/overturned_sar/trigger_spec.rb:0.2559947190020466 -spec/features/user_journeys/sar/non_trigger_spec.rb:15.623770240999875 -spec/helpers/users_helper_spec.rb:0.08300846099155024 -spec/lib/feature_set_spec.rb:0.010491957000340335 -spec/models/business_unit_spec.rb:7.272029158004443 -spec/models/cases_users_transitions_tracker_spec.rb:1.0248868789931294 -spec/models/commissioning_document_spec.rb:0.4260212369990768 -spec/models/commissioning_document_template/cat_a_spec.rb:0.03675378100888338 -spec/models/commissioning_document_template/probation_spec.rb:0.03708223199646454 -spec/models/concerns/case_states_spec.rb:3.770063941992703 -spec/models/data_request_spec.rb:1.2778602549951756 -spec/models/letter_template_spec.rb:0.040480918003595434 -spec/models/teams_users_role_spec.rb:0.06641454598866403 -spec/policies/assignment_policy_spec.rb:1.2565775019902503 -spec/policies/cases/ico/foi_policy_spec.rb:0.18922107000253163 -spec/policies/cases/sar/offender_complaint_policy_spec.rb:0.40652114000113215 -spec/policies/cases/sar_policy_spec.rb:8.385686472989619 -spec/policies/user_policy_spec.rb:0.22772861699922942 -spec/services/case_deletion_service_spec.rb:0.6964809830096783 -spec/services/case_extend_sar_deadline_service_spec.rb:4.126647169003263 -spec/services/case_filter/case_complaint_type_filter_spec.rb:3.0201839650108013 -spec/services/case_filter/timeliness_filter_spec.rb:3.909753764994093 -spec/services/case_send_back_service_spec.rb:0.7708739769877866 -spec/services/contacts_search_service_spec.rb:0.013625770996441133 -spec/services/csv_generator_spec.rb:0.004462097989744507 -spec/services/global_nav_manager/tab_spec.rb:0.008038850995944813 -spec/services/global_nav_manager_spec.rb:0.17807007201190572 -spec/services/new_overturned_ico_case_service_spec.rb:6.819816270988667 -spec/services/response_uploader_service_spec.rb:5.0655156349967 -spec/services/retention_schedules_update_service_spec.rb:3.3189500299922656 -spec/services/stats/etl/base_closed_cases_spec.rb:0.5932038099999772 -spec/services/stats/etl/offender_sar_closed_cases_spec.rb:0.37759925800492056 -spec/services/stats/r003_business_unit_performance_report_spec.rb:5.41545316799602 -spec/services/stats/r005_monthly_performance_report_spec.rb:10.726883583993185 -spec/services/stats/r006_kilo_map_spec.rb:1.2030396410118556 -spec/services/stats/r007_closed_cases_report_spec.rb:0.906874506996246 -spec/services/stats/r207_offender_ico_complaint_monthly_performance_report_spec.rb:3.5359342669980833 -spec/services/update_closure_service_spec.rb:0.9983666810003342 -spec/services/user_reassignment_service_spec.rb:2.0561832129897084 -spec/state_machines/ico_event_spec.rb:13.795564343003207 -spec/state_machines/workflows/predicates_spec.rb:9.084068865005975 -spec/validators/case_link_type_validator_spec.rb:0.1510576299915556 -spec/views/assignments/reassign_user_page_spec.rb:0.11939020499994513 -spec/views/cases/approvals/new_html_slim_spec.rb:2.2423345100105507 -spec/views/cases/data_requests/new_html_slim_spec.rb:0.04631645401241258 -spec/views/cases/foi/_case_details_html_slim_spec.rb:2.7513455580046866 +spec/features/cases/ico/case_creating/creating_spec.rb:47.035531000001356 +spec/controllers/cases/ico_controller_spec.rb:41.360731999971904 +spec/factory_specs/overturned_ico_foi_factory_spec.rb:29.975869999965653 +spec/features/cases/foi/case_closing_spec.rb:20.290065000066534 +spec/features/admin/joining_teams_spec.rb:18.110402999911457 +spec/features/cases/offender_sar/case_editing_spec.rb:16.677566000027582 +spec/features/cases/foi/case_creating/creating_spec.rb:16.082118000020273 +spec/controllers/cases/overturned_icofoi_controller_spec.rb:12.458107999991626 +spec/features/admin/add_information_officer_spec.rb:11.933115000021644 +spec/features/cases/ico/require_further_action_ico_sar_spec.rb:11.524338999995962 +spec/services/directorate_move_service_spec.rb:10.087034999975003 +spec/controllers/cases/offender_sar_controller_spec.rb:8.977130000013858 +spec/services/deadline_calculator/calendar_days_spec.rb:8.705828999984078 +spec/models/case/foi/standard_spec.rb:7.605458999983966 +spec/services/case_filter/case_type_filter_spec.rb:6.096337000024505 +spec/features/admin/moving_teams_spec.rb:5.773390999995172 +spec/features/cases/foi/case_reassign_user/reassign_user_spec.rb:5.742665000027046 +spec/features/cases/offender_sar/upload_commissioning_document_spec.rb:5.529717999976128 +spec/services/case_filter/case_trigger_flag_filter_spec.rb:4.304032000014558 +spec/state_machines/workflows/sar_permitted_events/sar_trigger_spec.rb:4.249568999977782 +spec/features/cases/foi/case_responding/upload_response_spec.rb:3.6887420000275597 +spec/services/case_filter/exemption_filter_spec.rb:3.6660969998920336 +spec/models/case/overturned_ico/foi_spec.rb:3.1865530000068247 +spec/policies/case/sar/internal_review_policy_spec.rb:3.1357779999962077 +spec/controllers/cases/filters_controller/filters_controller_spec.rb:2.9327589999884367 +spec/features/cases/foi/case_assignment_responding_spec.rb:2.821248000022024 +spec/controllers/cases/links_controller_spec.rb:2.797571999952197 +spec/services/stats/r206_offender_standard_complaint_monthly_performance_report_spec.rb:2.7628699999768287 +spec/services/stats/r208_offender_litigation_complaint_monthly_performance_report_spec.rb:2.5213590000057593 +spec/state_machines/workflows/offender_sar_complaint_permitted_events/ico_spec.rb:2.3937450000084937 +spec/decorators/case/sar/offender_complaint_decorator_spec.rb:2.2859000000171363 +spec/decorators/case/overturned_ico/foi_decorator_spec.rb:2.1981249999953434 +spec/services/case_filter/received_date_filter_spec.rb:2.1955209999578074 +spec/services/stats/etl/base_closed_cases_spec.rb:1.6445170000661165 +spec/views/cases/overturned_shared/new_html_slim_spec.rb:1.5330310000572354 +spec/models/concerns/draft_timeliness_spec.rb:1.16077000007499 +spec/controllers/passwords_controller_spec.rb:1.1581669999286532 +spec/jobs/request_personal_information_job_spec.rb:1.111942999996245 +spec/services/case_reopen_service_spec.rb:0.953321999986656 +spec/services/stats/base_report_spec.rb:0.9005069999257103 +spec/services/case_remove_sar_deadline_extension_service_spec.rb:0.6543909999309108 +spec/models/case_closure/info_held_status_spec.rb:0.6353660000022501 +spec/services/complaint_case_updater_service_spec.rb:0.5799510000506416 +spec/controllers/cases/sar_internal_review_controller_spec.rb:0.566774999955669 +spec/helpers/assignments_helper_spec.rb:0.536917999968864 +spec/features/cases/offender_sar/preview_cover_page_spec.rb:0.45975499995984137 +spec/views/cases/_take_case_on_or_de_escalate_spec.rb:0.2800549999810755 +spec/views/teams/new_html_slim_spec.rb:0.13812699995469302 +spec/state_machines/configurable_state_machine/config_validator_spec.rb:0.11287500010803342 +spec/services/request_personal_information/file_builder_spec.rb:0.1065330000128597 +spec/views/teams/update_directorate_html_slim_spec.rb:0.09332600003108382 +spec/helpers/users_helper_spec.rb:0.08406499994453043 +spec/views/layouts/_global_nav_html_slim_spec.rb:0.039481000043451786 +spec/views/cases/responses/upload_responses_html_slim_spec.rb:0.03899500006809831 +spec/models/case_closure/offender_complaint_outcome_spec.rb:0.0359910000115633 +spec/models/case_closure/approval_flag/ico_offender_complaint_spec.rb:0.025243000010959804 +spec/presenters/retention_schedule_case_note_spec.rb:0.016361000016331673 +spec/features/admin/cases/create_overturned_sar_spec.rb:0.007120999973267317 +spec/services/stats/stats_collector_spec.rb:0.007120999973267317 Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} -spec/controllers/assignments_controller/assign_to_team_member_spec.rb:1.9091414689901285 -spec/controllers/cases/clearances_controller_spec.rb:19.354702177995932 -spec/controllers/cases/filters_controller/open_spec.rb:1.3326461020042188 -spec/controllers/heartbeat_controller_spec.rb:0.02650764498685021 -spec/controllers/retention_schedules_controller_spec.rb:1.93182184699981 -spec/controllers/teams_controller/destroy_spec.rb:0.6400403280131286 -spec/factory_specs/ico_factory_spec.rb:7.986758951010415 -spec/features/admin/business_units_spec.rb:5.79405574798875 -spec/features/admin/moving_teams_spec.rb:5.993703996995464 -spec/features/cases/foi/case_approvals/private_office_approvals_spec.rb:9.458813318997272 -spec/features/cases/foi/case_assigning_spec.rb:1.844462224005838 -spec/features/cases/foi/case_creating/creating_spec.rb:15.015279679995729 -spec/features/cases/foi/case_extend_for_pit_spec.rb:1.462910155998543 -spec/features/cases/foi/case_search_spec.rb:3.933663750998676 -spec/features/cases/list_filter_journey_spec.rb:310.79288447799627 -spec/features/cases/offender_sar/generate_commissioning_document_spec.rb:2.2086459169950103 -spec/features/cases/offender_sar_complaint/case_progressing_spec.rb:151.05980743299006 -spec/features/cases/sar/case_approval_spec.rb:9.339884371001972 -spec/features/cases/sar/case_deleting_spec.rb:6.152176172006875 -spec/features/cases/sar_internal_review/case_closing_spec.rb:6.0666200459963875 -spec/features/common/feedback_spec.rb:1.2006184670026414 -spec/features/common/primary_navigation_spec.rb:1.8741729860048508 -spec/features/common/sign_in_spec.rb:0.851969690003898 -spec/features/user_journeys/ico/trigger_e2e_journey_spec.rb:42.71342011600791 -spec/features/user_journeys/overturned_sar/non_trigger_spec.rb:12.825292312001693 -spec/form_models/offender_sar_case_form_spec.rb:0.16583250800613314 -spec/jobs/performance_report_job_spec.rb:0.017020314000546932 -spec/lib/host_env_spec.rb:0.04106235000654124 -spec/mailers/devise_mailer_spec.rb:0.21356963299331255 -spec/models/case/foi/compliance_review_spec.rb:0.0821750220056856 -spec/models/case/overturned_ico/base_spec.rb:2.550368721000268 -spec/models/case_closure/outcome_spec.rb:0.02798608099692501 -spec/models/commissioning_document_template/prison_spec.rb:0.0386091299878899 -spec/models/contact_spec.rb:0.056748276998405345 -spec/models/feedback_spec.rb:0.015912845003185794 -spec/models/letter_spec.rb:0.534082975005731 -spec/models/reporting_period/date_interval_spec.rb:0.001385315990773961 -spec/models/reporting_period/quarter_to_date_spec.rb:0.002611928997794166 -spec/routing/admin_routes_spec.rb:0.2558758619998116 -spec/services/case_filter/case_retention_deadline_filter_spec.rb:2.639089132004301 -spec/services/case_filter/exemption_filter_spec.rb:3.5952925860037794 -spec/services/case_filter/open_case_status_filter_spec.rb:7.125759993999964 -spec/services/case_require_further_action_service_spec.rb:3.331275905002258 -spec/services/csv_exporter_spec.rb:3.941436576002161 -spec/services/deadline_calculator/calendar_months_spec.rb:0.3328489430132322 -spec/services/notify_responder_service_spec.rb:0.522748022005544 -spec/services/request_uploader_service_spec.rb:1.9944558239949401 -spec/services/stats/r208_offender_litigation_complaint_monthly_performance_report_spec.rb:3.4681590490072267 -spec/services/user_creation_service_spec.rb:3.157307729998138 -spec/state_machines/foi_event_spec.rb:28.61630969500402 -spec/state_machines/overturned_sar_event_spec.rb:11.029754426999716 -spec/state_machines/workflows/offender_sar_permitted_events/standard_spec.rb:1.8178806499927305 -spec/state_machines/workflows/sar_internal_review_permitted_events/sar_internal_review_trigger_spec.rb:8.38798677000159 -spec/views/assignments/edit_page_spec.rb:2.6130187480011955 -spec/views/cases/_case_attachments_html_slim_spec.rb:1.7069071119913133 -spec/views/cases/clearances/_clearance_copy_html_slim_spec.rb:0.8049254920042586 -spec/views/cases/commissioning_documents/new_html_slim_spec.rb:0.04410488599387463 -spec/views/cases/data_requests/show_html_slim_spec.rb:0.054422024986706674 -spec/views/cases/letters/new.html.slim_spec.rb:0.00030007299210410565 -spec/views/cases/letters/render_letter.html.slim_spec.rb:0.0002072060015052557 -spec/views/teams/join_teams_html_slim_spec.rb:0.1289902849966893 -spec/views/users/confirm_destroy_html_slim_spec.rb:0.49484314800065476 +spec/features/user_journeys/foi/trigger_e2e_spec.rb:48.593246000004 +spec/features/cases/offender_sar/case_creating_spec.rb:46.567823000019416 +spec/features/user_journeys/foi/compliance_review_trigger_e2e_spec.rb:40.14899700006936 +spec/features/user_journeys/sar/trigger_spec.rb:29.29988599999342 +spec/controllers/cases/overturned_icosar_controller_spec.rb:24.10314300004393 +spec/features/cases/foi/case_approvals/press_office_approvals_spec.rb:15.309840000001714 +spec/state_machines/workflows/overturned_sar_permitted_events/trigger_spec.rb:13.321753000025637 +spec/features/cases/foi/case_filtering_spec.rb:11.738352999906056 +spec/state_machines/workflows/foi_permitted_events/full_approval_spec.rb:10.403116000001319 +spec/features/cases/overturned_foi/accept_and_reject_spec.rb:10.389429000089876 +spec/controllers/cases/sar_controller_spec.rb:9.298494999995455 +spec/factory_specs/overturned_ico_sar_factory_spec.rb:9.006312999990769 +spec/services/stats/r005_monthly_performance_report_spec.rb:8.932854000013322 +spec/services/team_join_service_spec.rb:8.661102999933064 +spec/mailers/action_notifications_mailer_spec.rb:8.253708999953233 +spec/policies/case/overturned_ico/sar_policy_spec.rb:7.7891059999819845 +spec/services/team_move_service_spec.rb:7.723551000002772 +spec/policies/case/foi/standard_policy_spec.rb:7.161808000062592 +spec/services/case_flag_for_clearance_service_spec.rb:5.060105000040494 +spec/features/cases/offender_sar_complaint/log_data_received_spec.rb:4.331996000022627 +spec/features/cases/foi/link_a_case_spec.rb:4.065835000015795 +spec/controllers/cases/responses_controller/upload_response_and_return_for_redraft_spec.rb:3.795737999957055 +spec/services/stats/r501_offender_sar_retention_report_spec.rb:3.635456999996677 +spec/views/cases/ico/_ico_final_decision_html_slim_spec.rb:3.6203320000786334 +spec/features/cases/foi/case_search_spec.rb:3.604700000025332 +spec/features/cases/ico/delete_ico_spec.rb:3.5554659999907017 +spec/controllers/assignments_controller/execute_reassign_user_spec.rb:3.417401000042446 +spec/features/cases/foi/case_listing/incoming_cases_spec.rb:3.1184969999594614 +spec/features/cases/offender_sar/log_data_received_spec.rb:2.497609000070952 +spec/services/case_filter/case_high_profile_filter_spec.rb:2.2844669999321923 +spec/services/user_creation_service_spec.rb:1.8317790000000969 +spec/views/cases/closable/closure_outcomes_html_slim_spec.rb:1.7961379999760538 +spec/features/cases/foi/case_assigning_spec.rb:1.553237000014633 +spec/policies/report_type_policy_spec.rb:1.4911259999498725 +spec/views/cases/approvals/new_html_slim_spec.rb:1.4507529999827966 +spec/features/cases/offender_sar/adding_note_to_case_history_spec.rb:1.2083529999945313 +spec/policies/assignment_policy_spec.rb:1.1286870000185445 +spec/features/common/sign_in_spec.rb:1.1107840000186116 +spec/services/stats/base_monthly_performance_report_spec.rb:0.8358720000833273 +spec/validators/responded_case_validator_spec.rb:0.7459650000091642 +spec/helpers/teams_helper_spec.rb:0.71873099997174 +spec/models/personal_information_request_spec.rb:0.686111000017263 +spec/decorators/user_decorator_spec.rb:0.5843450000975281 +spec/models/commissioning_document_spec.rb:0.5276640000520274 +spec/controllers/cases/notes_controller_spec.rb:0.29939200007356703 +spec/models/case/foi/timeliness_review_spec.rb:0.20109800004865974 +spec/models/report_spec.rb:0.1665479999501258 +spec/models/case/foi/compliance_review_spec.rb:0.15152900002431124 +spec/services/global_nav_manager_spec.rb:0.1385879999725148 +spec/views/cases/data_requests/send_email_html_slim_spec.rb:0.11178599996492267 +spec/views/cases/new_html_slim_spec.rb:0.10899199999403208 +spec/services/request_personal_information/request_builder_spec.rb:0.058736000093631446 +spec/views/cases/cover_pages/show_html_slim_spec.rb:0.052565000019967556 +spec/views/cases/data_requests/edit_html_slim_spec.rb:0.03665400005411357 +spec/models/commissioning_document_template/security_spec.rb:0.031091999961063266 +spec/models/commissioning_document_template/cat_a_spec.rb:0.02906299999449402 +spec/forms/base_form_object_spec.rb:0.016912000020965934 +spec/models/case_number_counter_spec.rb:0.013098999974317849 +spec/models/reporting_period/last_quarter_spec.rb:0.0011580000864341855 +spec/models/reporting_period/date_interval_spec.rb:0.0010689999908208847 +Run options: include {:focus=>true} + +All examples were filtered out; ignoring {:focus=>true} +spec/features/cases/list_filter_journey_spec.rb:298.1131789999781 +spec/lib/cts/cases/cli_spec.rb:10.656629999983124 +spec/controllers/cases/offender_sar_complaint_controller_spec.rb:9.358849999960512 +spec/features/admin/business_units_spec.rb:7.161352999974042 +spec/policies/case/sar_policy_spec.rb:6.160956999985501 +spec/services/stats/r003_business_unit_performance_report_spec.rb:4.6208239999832585 +spec/views/cases/overturned_foi/_case_details_html_slim_spec.rb:4.198579999967478 +spec/helpers/cases_helper_spec.rb:4.136730999918655 +spec/controllers/cases/responses_controller/upload_response_and_approve_spec.rb:3.7776989999692887 +spec/features/cases/sar/editing_case_spec.rb:3.623321000020951 +spec/models/case/overturned_ico/sar_spec.rb:3.489551999955438 +spec/features/cases/overturned_foi/upload_response_spec.rb:2.7500500000314787 +spec/services/current_team_and_user_service_spec.rb:2.1367389999795705 +spec/controllers/cases/responses_controller/upload_responses_spec.rb:2.000958999968134 +spec/controllers/cases/commissioning_documents_controller_spec.rb:1.7884580000536516 +spec/services/stats/r205_offender_sar_monthly_performance_report_spec.rb:1.7038949999259785 +spec/services/request_further_clearance_service_spec.rb:1.6318290000781417 +spec/services/stats/etl/offender_sar_complaint_closed_cases_spec.rb:1.6037329999962822 +spec/state_machines/workflows/offender_sar_complaint_permitted_events/standard_spec.rb:1.4684290000004694 +spec/features/cases/sar/editing_closure_details_spec.rb:1.4246349999448285 +spec/models/case_attachment_upload_group_spec.rb:1.4030999999959022 +spec/features/cases/overturned_foi/create_case_spec.rb:1.1880440000677481 +spec/models/data_request_spec.rb:0.9902819999260828 +spec/services/stats/etl/closed_cases_spec.rb:0.9788849999895319 +spec/models/case_attachment_upload_group_collection_spec.rb:0.9032860000152141 +spec/state_machines/workflows/offender_sar_permitted_events/standard_spec.rb:0.8711749999783933 +spec/features/cases/offender_sar/partial_case_flags_update_spec.rb:0.8146669999696314 +spec/services/case_filter/case_update_sent_to_sscl_service_spec.rb:0.6926689998945221 +spec/decorators/search_query_decorator_spec.rb:0.6369560000021011 +spec/services/case_send_back_service_spec.rb:0.6125069999834523 +spec/features/cases/offender_sar_complaint/preview_cover_page_spec.rb:0.5517459999537095 +spec/features/cases/offender_sar_complaint/adding_note_to_case_history_spec.rb:0.526380000053905 +spec/features/cases/offender_sar/commissioning_document_spec.rb:0.4250640000682324 +spec/form_models/sar_internal_review_case_form_spec.rb:0.23580899997614324 +spec/decorators/commissioning_document_decorator_spec.rb:0.20871700008865446 +spec/routing/application_routes_spec.rb:0.15902100002858788 +spec/controllers/cases/cover_pages_controller_spec.rb:0.13941400009207428 +spec/views/cases/closable/edit_closure_html_slim_spec.rb:0.09389599994756281 +spec/form_models/offender_sar_case_form_spec.rb:0.08714100008364767 +spec/models/contact_spec.rb:0.05699700000695884 +spec/views/pages/accessibility.html.slim_spec.rb:0.042144999955780804 +spec/views/cases/links/new_spec.rb:0.03980799997225404 +spec/models/case_closure/offender_complaint_appeal_outcome_spec.rb:0.026093000080436468 +spec/views/cases/_linked_cases_html_slim_spec.rb:0.02447900001425296 +spec/controllers/heartbeat_controller_spec.rb:0.0211839999537915 +spec/decorators/correspondence_type_decorator_spec.rb:0.014448000001721084 +spec/services/request_personal_information/cryptography_spec.rb:0.0025369999930262566 +spec/models/reporting_period/quarter_to_date_spec.rb:0.0012839999981224537 +spec/models/reporting_period/last_month_spec.rb:0.0009040000149980187 +Run options: include {:focus=>true} + +All examples were filtered out; ignoring {:focus=>true} +spec/features/cases/search_filter_journeys_spec.rb:372.5340020000003 +spec/features/cases/offender_sar/add_data_requests_spec.rb:13.23434800002724 +spec/factory_specs/ico_factory_spec.rb:7.025989000103436 +spec/state_machines/workflows/overturned_sar_permitted_events/standard_spec.rb:4.083847000030801 +spec/features/cases/sar/case_responses_spec.rb:3.292697000084445 +spec/controllers/cases/searches_controller_spec.rb:2.8715419999789447 +spec/decorators/case/overturned_ico/base_decorator_spec.rb:2.264824999962002 +spec/controllers/assignments_controller/assign_to_team_spec.rb:1.9951489999657497 +spec/services/csv_exporter_spec.rb:1.937713999999687 +spec/policies/base_policy_scope_spec.rb:1.809929000097327 +spec/models/case/sar/offender_spec.rb:1.6515009999275208 +spec/services/team_finder_service_spec.rb:1.626189999980852 +spec/controllers/cases/approvals_controller_spec.rb:1.5798919999506325 +spec/services/assign_new_team_service_spec.rb:1.4554259999422356 +spec/controllers/retention_schedules_controller_spec.rb:1.2761610000161454 +spec/services/case_extend_for_pit_service_spec.rb:1.246532000019215 +spec/services/case_filter/case_complaint_priority_filter_spec.rb:1.1650169999338686 +spec/services/user_reassignment_service_spec.rb:1.081127000041306 +spec/services/case_filter/date_responded_filter_spec.rb:0.80345100001432 +spec/state_machines/workflows/hooks_spec.rb:0.7833669999381527 +spec/views/cases/responses/upload_response_and_return_for_redraft_html_slim_spec.rb:0.6273829999845475 +spec/models/linked_case_spec.rb:0.5704070000210777 +spec/views/cases/ico/edit_html_slim_spec.rb:0.40497599996160716 +spec/views/users/confirm_destroy_html_slim_spec.rb:0.3353329999372363 +spec/services/case_team_collection_spec.rb:0.3082179999910295 +spec/services/default_team_service_spec.rb:0.3060580000746995 +spec/features/user_journeys/overturned_foi/ovt_foi_trigger_e2e_spec.rb:0.18519500002730638 +spec/views/teams/edit_html_slim_spec.rb:0.17999999993480742 +spec/services/data_request_update_service_spec.rb:0.17169800004921854 +spec/validators/case_link_type_validator_spec.rb:0.08373700000811368 +spec/lib/papertrail_spec.rb:0.08297300001140684 +spec/jobs/search_index_updater_job_spec.rb:0.07517199998255819 +spec/models/report_type_spec.rb:0.06971499999053776 +spec/controllers/feedback_controller_spec.rb:0.06611399992834777 +spec/decorators/case_link_decorator_spec.rb:0.05761499993968755 +spec/views/stats/new_slim_spec.rb:0.03623399999924004 +spec/models/commissioning_document_template/probation_spec.rb:0.01997799996752292 +spec/models/case_closure/outcome_spec.rb:0.013199000037275255 +spec/services/state_selector_spec.rb:0.0031289999606087804 +spec/services/contacts_search_service_spec.rb:0.0013889999827370048 From 7d6bb597ccd9cfb54ece9e5404608cc7eb877b4a Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Wed, 10 Jul 2024 13:25:04 +0100 Subject: [PATCH 83/88] Try just 4 jobs --- .github/workflows/test.yml | 31 +++++++++---------------------- tmp/parallel_runtime_rspec.log | 29 ----------------------------- 2 files changed, 9 insertions(+), 51 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6b995af54..74c1e9b43f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,6 @@ jobs: run: bundle exec brakeman -q test: - name: Test groups ${{ matrix.ci_job_index }} needs: linting runs-on: ubuntu-latest permissions: @@ -41,8 +40,7 @@ jobs: DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 - CI_TOTAL_JOBS: ${{ matrix.ci_total_jobs }} - CI_JOB_INDEX: ${{ matrix.ci_job_index }} + CI_TOTAL_JOBS: 4 services: postgres: image: postgres:12-alpine @@ -52,17 +50,6 @@ jobs: ports: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - strategy: - fail-fast: false - matrix: - ci_total_jobs: [16] - ci_job_index: [ - "0, 1, 2, 3", - "4, 5, 6, 7", - "8, 9, 10, 11", - "12, 13, 14, 15" - ] - steps: - name: Checkout code uses: actions/checkout@v4 @@ -95,15 +82,15 @@ jobs: - name: Run unit and feature tests run: | - bundle exec rake parallel:setup[4] - bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" ./spec + bundle exec rake parallel:setup[${{CI_TOTAL_JOBS}}] + bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" - # - name: Code coverage - # uses: joshmfrankel/simplecov-check-action@main - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # minimum_suite_coverage: 92 - # minimum_file_coverage: 100 + - name: Code coverage + uses: joshmfrankel/simplecov-check-action@main + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + minimum_suite_coverage: 92 + minimum_file_coverage: 100 build-and-deploy: if: ${{ github.ref == 'refs/heads/main' }} diff --git a/tmp/parallel_runtime_rspec.log b/tmp/parallel_runtime_rspec.log index 36ccf7f40b..3d7f3bd6ce 100644 --- a/tmp/parallel_runtime_rspec.log +++ b/tmp/parallel_runtime_rspec.log @@ -1,6 +1,4 @@ -Run options: include {:focus=>true} -All examples were filtered out; ignoring {:focus=>true} spec/state_machines/ico_event_spec.rb:19.020617000060156 spec/features/cases/offender_sar_complaint/case_closing_spec.rb:17.98283800005447 spec/services/mark_response_as_sent_service_spec.rb:13.69093799998518 @@ -53,9 +51,6 @@ spec/models/commissioning_document_template/prison_spec.rb:0.06686299992725253 spec/models/reporting_period/calculator_spec.rb:0.05479000008199364 spec/models/business_group_spec.rb:0.033513000002130866 spec/models/reporting_period/year_to_date_spec.rb:0.02248299994971603 -Run options: include {:focus=>true} - -All examples were filtered out; ignoring {:focus=>true} spec/features/cases/offender_sar_complaint/case_editing_spec.rb:53.133965000044554 spec/features/cases/filters/timeliness_spec.rb:45.853046000003815 spec/features/cases/ico/editing_case_spec.rb:41.07956899993587 @@ -114,9 +109,6 @@ spec/views/cases/_case_history_html_slim_spec.rb:0.013429999933578074 spec/models/directorate_spec.rb:0.010974999982863665 spec/lib/feature_set_spec.rb:0.008757999981753528 spec/models/singular_spec.rb:0.002687999978661537 -Run options: include {:focus=>true} - -All examples were filtered out; ignoring {:focus=>true} spec/state_machines/workflows/overturned_foi_permitted_events/full_approval_spec.rb:40.118436000077054 spec/features/cases/overturned_foi/case_closing_spec.rb:39.86171199998353 spec/models/case/base_spec.rb:35.216439999989234 @@ -176,9 +168,6 @@ spec/models/category_reference_spec.rb:0.007877999916672707 spec/jobs/pdf_maker_job_spec.rb:0.007822999963536859 spec/models/concerns/searchable_spec.rb:0.006227000034414232 spec/features/admin/cases/adding_cases_spec.rb:0.0020279999589547515 -Run options: include {:focus=>true} - -All examples were filtered out; ignoring {:focus=>true} spec/features/user_journeys/ico/trigger_e2e_journey_spec.rb:47.34891299996525 spec/services/stats/r004_cabinet_office_report_spec.rb:42.35148499999195 spec/state_machines/workflows/overturned_foi_permitted_events/trigger_spec.rb:22.322922999970615 @@ -237,9 +226,6 @@ spec/models/commissioning_document_template/base_spec.rb:0.02057799999602139 spec/services/bypass_params_manager_spec.rb:0.005730999982915819 spec/services/csv_generator_spec.rb:0.004329000017605722 spec/features/admin/cases/create_overturned_foi_spec.rb:0.0002899999963119626 -Run options: include {:focus=>true} - -All examples were filtered out; ignoring {:focus=>true} spec/features/cases/offender_sar_complaint/case_creating_spec.rb:90.00734100001864 spec/models/warehouse/case_report_spec.rb:42.635130999959074 spec/models/case/scopes_spec.rb:22.55073999997694 @@ -297,9 +283,6 @@ spec/views/layouts/_header_html_slim_spec.rb:0.023569000069983304 spec/helpers/views_helper_spec.rb:0.018626000033691525 spec/state_machines/configurable_state_machine/duplicate_key_detector_spec.rb:0.013090999913401902 spec/services/request_personal_information/attachment_spec.rb:0.004535999963991344 -Run options: include {:focus=>true} - -All examples were filtered out; ignoring {:focus=>true} spec/features/cases/offender_sar_complaint/case_progressing_spec.rb:117.45980000006966 spec/state_machines/foi_event_spec.rb:23.139416999998502 spec/features/cases/offender_sar/case_progressing_spec.rb:19.23123699997086 @@ -357,9 +340,6 @@ spec/models/feedback_spec.rb:0.012727999943308532 spec/services/global_nav_manager/tab_spec.rb:0.010567000019364059 spec/routing/filters_routes_spec.rb:0.009997999994084239 spec/i18n_spec.rb:0.0002880000974982977 -Run options: include {:focus=>true} - -All examples were filtered out; ignoring {:focus=>true} spec/features/cases/ico/case_creating/creating_spec.rb:47.035531000001356 spec/controllers/cases/ico_controller_spec.rb:41.360731999971904 spec/factory_specs/overturned_ico_foi_factory_spec.rb:29.975869999965653 @@ -419,9 +399,6 @@ spec/models/case_closure/approval_flag/ico_offender_complaint_spec.rb:0.02524300 spec/presenters/retention_schedule_case_note_spec.rb:0.016361000016331673 spec/features/admin/cases/create_overturned_sar_spec.rb:0.007120999973267317 spec/services/stats/stats_collector_spec.rb:0.007120999973267317 -Run options: include {:focus=>true} - -All examples were filtered out; ignoring {:focus=>true} spec/features/user_journeys/foi/trigger_e2e_spec.rb:48.593246000004 spec/features/cases/offender_sar/case_creating_spec.rb:46.567823000019416 spec/features/user_journeys/foi/compliance_review_trigger_e2e_spec.rb:40.14899700006936 @@ -482,9 +459,6 @@ spec/forms/base_form_object_spec.rb:0.016912000020965934 spec/models/case_number_counter_spec.rb:0.013098999974317849 spec/models/reporting_period/last_quarter_spec.rb:0.0011580000864341855 spec/models/reporting_period/date_interval_spec.rb:0.0010689999908208847 -Run options: include {:focus=>true} - -All examples were filtered out; ignoring {:focus=>true} spec/features/cases/list_filter_journey_spec.rb:298.1131789999781 spec/lib/cts/cases/cli_spec.rb:10.656629999983124 spec/controllers/cases/offender_sar_complaint_controller_spec.rb:9.358849999960512 @@ -534,9 +508,6 @@ spec/decorators/correspondence_type_decorator_spec.rb:0.014448000001721084 spec/services/request_personal_information/cryptography_spec.rb:0.0025369999930262566 spec/models/reporting_period/quarter_to_date_spec.rb:0.0012839999981224537 spec/models/reporting_period/last_month_spec.rb:0.0009040000149980187 -Run options: include {:focus=>true} - -All examples were filtered out; ignoring {:focus=>true} spec/features/cases/search_filter_journeys_spec.rb:372.5340020000003 spec/features/cases/offender_sar/add_data_requests_spec.rb:13.23434800002724 spec/factory_specs/ico_factory_spec.rb:7.025989000103436 From 1a99ae8f1998c9eeb257f541313dfcaf4b4dda15 Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Wed, 10 Jul 2024 13:30:49 +0100 Subject: [PATCH 84/88] hard code number --- .github/workflows/test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 74c1e9b43f..5a7711192a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,6 @@ jobs: DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 - CI_TOTAL_JOBS: 4 services: postgres: image: postgres:12-alpine @@ -82,8 +81,8 @@ jobs: - name: Run unit and feature tests run: | - bundle exec rake parallel:setup[${{CI_TOTAL_JOBS}}] - bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" + bundle exec rake parallel:setup[4] + bundle exec parallel_rspec -n 4 - name: Code coverage uses: joshmfrankel/simplecov-check-action@main From 933c031786da73d194e7029ec19934efcd15ad2f Mon Sep 17 00:00:00 2001 From: Andrew Pepler Date: Wed, 10 Jul 2024 13:59:11 +0100 Subject: [PATCH 85/88] Enable coverage --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a7711192a..975f03920e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,6 +40,7 @@ jobs: DATABASE_URL: "postgresql://postgres:postgres@127.0.0.1" AWS_ACCESS_KEY_ID: 123 AWS_SECRET_ACCESS_KEY: 456 + COVERAGE: true services: postgres: image: postgres:12-alpine From f43fa3508ec72677895909b9f27969ff3a38c784 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Wed, 10 Jul 2024 15:02:48 +0100 Subject: [PATCH 86/88] fix typo --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d9c77ff504..7490a78824 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -330,7 +330,7 @@ jobs: jobs="${{ vars.ECR_URL }}:$SHA" kubectl set image -n ${KUBE_NAMESPACE} \ - cronjobs/eamil-status \ + cronjobs/email-status \ jobs="${{ vars.ECR_URL }}:$SHA" - name: Send deploy notification to product Slack channel From 1b51db4977e618f893d91685eea0f15d5651b68f Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Wed, 10 Jul 2024 15:43:35 +0100 Subject: [PATCH 87/88] add QA deploy --- .github/workflows/deploy.yml | 100 +++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7490a78824..ae93df9e0e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -257,6 +257,106 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + deploy-qa: + runs-on: ubuntu-latest + needs: build + environment: qa + + permissions: + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + + env: + KUBE_NAMESPACE: ${{ secrets.KUBE_NAMESPACE }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Assume role in Cloud Platform + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }} + aws-region: ${{ vars.ECR_REGION }} + + - name: Login to container repository + uses: aws-actions/amazon-ecr-login@v2 + id: login-ec + + - name: Store build tag + id: vars + run: | + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + short_sha=$(git rev-parse --short $SHA) + build_tag=$PREFIX-$branch-$short_sha + echo "build_tag=$build_tag" >> $GITHUB_OUTPUT + + - name: Tag build and push to ECR + run: | + docker pull ${{ vars.ECR_URL }}:$SHA + docker tag ${{ vars.ECR_URL }}:$SHA ${{ vars.ECR_URL }}:qa.latest + docker push ${{ vars.ECR_URL }}:qa.latest + + - name: Authenticate to the cluster + env: + KUBE_CERT: ${{ secrets.KUBE_CERT }} + KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }} + KUBE_CLUSTER: ${{ secrets.KUBE_CLUSTER }} + run: | + echo "${KUBE_CERT}" > ca.crt + kubectl config set-cluster ${KUBE_CLUSTER} --certificate-authority=./ca.crt --server=https://${KUBE_CLUSTER} + kubectl config set-credentials deploy-user --token=${KUBE_TOKEN} + kubectl config set-context ${KUBE_CLUSTER} --cluster=${KUBE_CLUSTER} --user=deploy-user --namespace=${KUBE_NAMESPACE} + kubectl config use-context ${KUBE_CLUSTER} + + - name: Rollout restart deployment + run: | + kubectl set image -n ${KUBE_NAMESPACE} \ + deployment/track-a-query \ + webapp="${{ vars.ECR_URL }}:$SHA" \ + quickjobs="${{ vars.ECR_URL }}:$SHA" \ + uploads="${{ vars.ECR_URL }}:$SHA" \ + pending-migrations="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + deployment/track-a-query-jobs \ + jobs="${{ vars.ECR_URL }}:$SHA" \ + pending-migrations="${{ vars.ECR_URL }}:$SHA" + + kubectl set image -n ${KUBE_NAMESPACE} \ + cronjobs/close-expired-rejected-offender-sars \ + jobs="${{ vars.ECR_URL }}:$SHA" + + - name: Send deploy notification to product Slack channel + uses: slackapi/slack-github-action@v1.25.0 + with: + payload: | + { + "attachments": [ + { + "color": "#1d990c", + "text": "${{ github.actor }} deployed *${{ steps.vars.outputs.build_tag }}* to *QA*", + "fields": [ + { + "title": "Project", + "value": "Correspondence Tool Staff", + "short": true + } + ], + "actions": [ + { + "text": "Visit Job", + "type": "button", + "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + } + ] + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + deploy-production: runs-on: ubuntu-latest needs: build From 974652fd2d090bfdad510e98dd012b9bb35e41a4 Mon Sep 17 00:00:00 2001 From: "lucas.shaw" Date: Wed, 10 Jul 2024 15:48:23 +0100 Subject: [PATCH 88/88] needs staging --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ae93df9e0e..ca9288acbd 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -359,7 +359,7 @@ jobs: deploy-production: runs-on: ubuntu-latest - needs: build + needs: deploy-staging if: ${{ github.ref == 'refs/heads/main' }} environment: production