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

Test fail #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
24 changes: 23 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run tests
run: |
go test ./... -v -race -coverprofile cover.out -covermode=atomic
- name: Tests fail notif
if: failure()
id: test_fail_notif
uses: ./
with: # Set the secrets as inputs
# Login expects the bot's bare jid (user@domain)
login: ${{ secrets.bot_username }}
pass: ${{ secrets.bot_password }}
server_domain: ${{ secrets.server_rooms_domain }}
# Correspondent is the intended recipient of the notification.
# If it is a single user, the bare Jid is expected (jid without resource)
# If it is a chat room, only the name of it is expected, and "server_domain" will be used to complete the jid
correspondant: ${{ secrets.room_correspondent }}
# Port is optional. Defaults to 5222
server_port: ${{ secrets.server_port }}
message: |
tests for the following commit have failed : ${{ github.event.pull_request.html_url }}
# Boolean to indicate if correspondent should be treated as a room (true) or a single user
correspondent_is_room: true
- name: push_info_step
id: push
uses: ./
Expand Down Expand Up @@ -61,4 +83,4 @@ jobs:
message: |
${{ github.actor }} edited the following PR : ${{ github.event.pull_request.html_url }} with message :
${{ github.event.pull_request.title }}
correspondent_is_room: true
correspondent_is_room: true
7 changes: 7 additions & 0 deletions dummy_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "testing"

func TestAlwaysFails(t *testing.T) {
t.Fatal("I always fail")
}