Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Remove simple-slack-notify and move to using github slack app #2819

Merged
merged 6 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions .github/workflows/lighthouse-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Lighthouse CI accessibility checks
on: [pull_request]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
lhci:
name: Lighthouse CI
Expand All @@ -25,18 +27,3 @@ jobs:
run: ./lighthouse/lighthouse.sh
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
- name: Create Slack notification
if: always()
uses: edge/simple-slack-notify@master
with:
channel: '#pat-lib-notifications'
status: ${{ job.status }}
success_text: 'Lighthouse tests completed successfully'
failure_text: 'Lighthouse tests failed'
cancelled_text: 'Lighthouse tests was cancelled'
fields: |
[{ "title": "Action", "value": "${env.GITHUB_WORKFLOW} - build (${env.GITHUB_RUN_NUMBER})", "short": true },
{ "title": "Repository", "value": "${env.GITHUB_REPOSITORY}", "short": true },
{ "title": "By", "value": "${{ github.actor }}", "short": true },
{ "title": "Branch", "value": "${{ github.head_ref }}", "short": true },
{ "title": "View job", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"}]
25 changes: 25 additions & 0 deletions .github/workflows/macro-and-script-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run macro and script tests
on: [push]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
RUNNING_IN_CI: true

jobs:
run-macro-and-script-tests:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Read .nvmrc file
id: read-nvmrc-file
run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}"
- name: Install dependencies
run: yarn install
- name: Run macro and script tests
run: yarn test
16 changes: 2 additions & 14 deletions .github/workflows/npm-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: Publish Design System to npm
on:
release:
types: [published]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -28,17 +30,3 @@ jobs:
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Create Slack notification
if: always()
uses: edge/simple-slack-notify@master
with:
channel: '#pat-lib-notifications'
status: ${{ job.status }}
success_text: 'Successfully published release to npm'
failure_text: 'Failed to publish release to npm'
cancelled_text: 'Publish release to npm was cancelled'
fields: |
[{ "title": "Action", "value": "${env.GITHUB_WORKFLOW} - build (${env.GITHUB_RUN_NUMBER})", "short": true },
{ "title": "Repository", "value": "${env.GITHUB_REPOSITORY}", "short": true },
{ "title": "By", "value": "${{ github.actor }}"},
{ "title": "View job", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"}]
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Release
on:
release:
types: [published]

jobs:
add-templates-to-release:
runs-on: ubuntu-latest
Expand Down
80 changes: 0 additions & 80 deletions .github/workflows/tests.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/visual-regression-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run visual regression tests
on: [push]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
RUNNING_IN_CI: true

jobs:
run-visual-regression-tests:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
url: https://github.com/ONSdigital/design-system.git
- name: Read .nvmrc file
id: read-nvmrc-file
run: echo "nvmrc=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "${{ steps.read-nvmrc-file.outputs.nvmrc }}"
- name: Install dependencies
run: yarn install
- name: Install Docker
run: |
brew install docker
colima start
- name: Run visual regression tests
run: yarn test-visual
Loading