Skip to content

MESH-2092 github actions (deps): Bump slackapi/slack-github-action from 3.0.5 to 4.0.0 in the major group across 1 directory #485

MESH-2092 github actions (deps): Bump slackapi/slack-github-action from 3.0.5 to 4.0.0 in the major group across 1 directory

MESH-2092 github actions (deps): Bump slackapi/slack-github-action from 3.0.5 to 4.0.0 in the major group across 1 directory #485

Workflow file for this run

name: pull-request
on:
pull_request:
branches:
- develop
jobs:
coverage:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/terraform-aws-mesh-client'
steps:
- name: checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: common build setup
uses: ./.github/actions/build-common
- name: ci install
uses: ./.github/actions/install-ci
- name: black
run: make black-check
- name: start localstack
run: make up-ci
- name: coverage and sonar scan
uses: ./.github/actions/coverage-and-sonar
if: github.actor != 'dependabot[bot]' && (success() || failure())
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
sonar-token: ${{ secrets.SONAR_TOKEN }}
- name: archive reports
if: github.actor != 'dependabot[bot]' && (success() || failure())
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: reports
path: reports/**/*
- name: publish junit reports
if: success() || failure()
uses: mikepenz/action-junit-report@d9f48fc87bc235f7e214acf696ca5abc0a986f16 # v6.4.2
with:
check_name: junit reports
report_paths: reports/junit/*.xml
- name: stop docker containers
if: success() || failure()
run: make down
tox:
strategy:
matrix:
python-version: ["3.11", "3.12"]
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/terraform-aws-mesh-client'
steps:
- name: checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: common build setup
uses: ./.github/actions/build-common
with:
force-python-version: ${{ matrix.python-version }}
- name: ci install
uses: ./.github/actions/install-ci
- name: install tox-github-ci plugin
run: |
poetry run pip install --only-binary :all: tox-gh-actions
- name: black
run: make black-check
- name: start localstack
run: make up-ci
- name: run tests in tox
run: make tox
- name: stop docker containers
if: success() || failure()
run: make down
lint:
runs-on: ubuntu-latest
if: github.repository == 'NHSDigital/terraform-aws-mesh-client'
steps:
- name: checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: common build setup
uses: ./.github/actions/build-common
- name: ci install
uses: ./.github/actions/install-ci
- name: black
run: make black-check
- name: tfsec
run: |
TFSEC_VERSION="v$(cat .tool-versions | grep tfsec | sed 's#tfsec ##')"
echo "${TFSEC_VERSION}"
wget -q --max-redirect=5 "https://github.com/aquasecurity/tfsec/releases/download/${TFSEC_VERSION}/tfsec-linux-amd64" -O ./tfsec
chmod +x ./tfsec
./tfsec module --config-file tfsec.yml
- name: tflint
run: make tflint
- name: ruff
run: make ruff-ci
- name: mypy
run: make mypy
- name: shellcheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
with:
ignore_paths: .venv build
ignore_names: git-secrets
env:
SHELLCHECK_OPTS: -f gcc -e SC1090,SC1091
slack-notification:
runs-on: ubuntu-latest
needs:
- coverage
- lint
if: ${{ always() && github.actor== 'dependabot[bot]' && contains(needs.*.result, 'failure') }}
steps:
- name: Slack Notification
uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0
with:
webhook: ${{ secrets.DEPENDABOT_SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":alarm: DEPENDABOT PR FAILED :alarm:",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Checks failed for ${{ github.repository }}:${{ github.ref }} in <https://github.com/${{ github.repository }}/pull/${{ github.event.number }}|PR #${{ github.event.number }}>"
}
}
]
}