Skip to content

Commit

Permalink
Trigger build failure Slack notify only on main repo (not forks) (#3039)
Browse files Browse the repository at this point in the history
Co-authored-by: Massimiliano Pippi <[email protected]>
  • Loading branch information
vblagoje and masci authored Aug 18, 2022
1 parent af24ffa commit be127e5
Showing 1 changed file with 16 additions and 26 deletions.
42 changes: 16 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'
if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

pylint:
runs-on: ubuntu-latest
Expand All @@ -86,8 +86,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

unit-tests:
name: Unit / ${{ matrix.os }}
Expand Down Expand Up @@ -115,8 +114,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

unit-tests-linux:
needs:
Expand Down Expand Up @@ -165,7 +163,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'
if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

unit-tests-windows:
needs:
Expand Down Expand Up @@ -213,8 +211,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

elasticsearch-tests-linux:
needs:
Expand Down Expand Up @@ -252,8 +249,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

elasticsearch-tests-windows:
needs:
Expand Down Expand Up @@ -291,8 +287,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

faiss-tests-linux:
needs:
Expand Down Expand Up @@ -324,8 +319,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

faiss-tests-windows:
needs:
Expand Down Expand Up @@ -360,8 +354,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

milvus-tests-linux:
needs:
Expand Down Expand Up @@ -403,8 +396,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

# FIXME: seems like we can't run containers on Windows
# milvus-tests-windows:
Expand Down Expand Up @@ -482,7 +474,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'
if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

# FIXME: seems like we can't run containers on Windows
# weaviate-tests-windows:
Expand Down Expand Up @@ -550,8 +542,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

pinecone-tests-windows:
needs:
Expand Down Expand Up @@ -588,7 +579,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'
if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

rest-and-ui:
needs:
Expand Down Expand Up @@ -620,8 +611,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'

if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

integration-tests-linux:
needs:
Expand Down Expand Up @@ -717,7 +707,7 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'
if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

integration-tests-windows:
needs:
Expand Down Expand Up @@ -768,4 +758,4 @@ jobs:
with:
status: ${{ job.status }}
channel: '#haystack'
if: failure() && github.ref == 'refs/heads/main'
if: failure() && github.repository_owner == 'deepset-ai' && github.ref == 'refs/heads/main'

0 comments on commit be127e5

Please sign in to comment.