Skip to content

Commit

Permalink
Set Slack webhook for lighthouse results
Browse files Browse the repository at this point in the history
  • Loading branch information
scruti committed Aug 8, 2024
1 parent 2915aff commit bb35274
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/accessibility_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,30 @@ jobs:
uses: ./.github/actions/prepare-app-env
with:
skip-ruby: true

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
role-to-assume: Deployments
role-duration-seconds: 3600
role-skip-session-tagging: true

- name: Get secrets from AWS ParameterStore
uses: dkershner6/aws-ssm-getparameters-action@v2
with:
parameterPairs: "/teaching-vacancies/github_action/infra/slack_webhook = SLACK_WEBHOOK"

- name: Set lighthouse config values
run: |
encoded_auth=$(echo -n $HTTP_BASIC_USER:$HTTP_BASIC_PASSWORD | base64)
sed -i "s/auth_token/${encoded_auth}/g" .lighthouserc.json
- name: Set environment variables for testing URLs
run: |
echo "INDEX_URL=https://qa.teaching-vacancies.service.gov.uk" >> $GITHUB_ENV
echo "INDEX_URL=https://qa.teaching-vacancies.service.gov.uk/" >> $GITHUB_ENV
echo "JOBS_URL=https://qa.teaching-vacancies.service.gov.uk/jobs" >> $GITHUB_ENV
echo "SCHOOLS_URL=https://qa.teaching-vacancies.service.gov.uk/schools" >> $GITHUB_ENV
Expand All @@ -188,7 +204,7 @@ jobs:

- name: Set environment variables for test results
run: |
echo "INDEX_RESULTS=$(${{steps.LHCIAction.outputs.links}} | jq '.["$INDEX_URL"]')" >> $GITHUB_ENV
echo "INDEX_RESULTS=$(echo '${{steps.LHCIAction.outputs.links}}' | jq '.["$INDEX_URL"]')" >> $GITHUB_ENV
- name: Notify twd_tv_dev channel on Lighthouse results
uses: rtCamp/[email protected]
Expand Down

0 comments on commit bb35274

Please sign in to comment.