-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.55 KB
/
behat.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: (M) Behat Tests
on:
workflow_call:
secrets:
slack_token:
description: "API token for slack"
site:
description: "Site to run tests on"
database:
description: "Database to pull in, normally blank"
prnum:
description: "Pull request number"
gh_token:
description: "A github token"
LANDO_ENV:
description: "Lando environment variables"
SLACK_WEBHOOK:
description: "Slack webhook to communicate with api"
REPO:
description: "Get current repo for gh cli command to comment on PR"
permissions:
contents: write
actions: read
pull-requests: write
jobs:
behat:
name: Run behat tests
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- id: Lando
uses: necyberteam/[email protected]
with:
DATABASE: ${{ secrets.DATABASE }}
GH_TOKEN_REPO: ${{ secrets.gh_token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run behat test
run: |
pwd
lando ssh -c 'pwd'
lando blt amp:behat $SITE
env:
SITE: ${{ secrets.site }}
- name: Slack Notification Fail
uses: MeilCli/[email protected]
if: failure()
with:
slack_token: ${{ secrets.SLACK_TOKEN }}
channel_id: behat-git-notifications
file_path: 'tests/behat/screenshots/*.png'
file_type: 'images'
initial_comment: 'Files found in tests/behat/screenshots, for help in diagnosing behat failures'