Skip to content

Commit

Permalink
Slack integration for daily health checks
Browse files Browse the repository at this point in the history
  • Loading branch information
jim22k committed Dec 8, 2020
1 parent b4ddf35 commit 3a4e535
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/daily_checkup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Daily Checkup
on:
schedule:
# * is a special character in YAML so you have to quote this string
# Run daily at 10:35pm
- cron: '35 22 * * *'
# Run daily at 3:35am UTC
- cron: '35 3 * * *'

env:
PYVER: 3.8
Expand All @@ -28,16 +28,24 @@ jobs:
conda install -c ${{ env.CHANNELS }} metagraph-stellargraph
conda list
- name: Pytest
# TODO: add `pytest --pyargs metagraph_stellargraph` once tests actually exist
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate mg
python -c 'import stellargraph'
python -c 'import metagraph_stellargraph.plugins; assert metagraph_stellargraph.plugins.has_stellargraph'
pytest --pyargs metagraph_stellargraph
python -m metagraph.tests
python -m metagraph.tests --dask
- name: Notify for Failure
if: failure()
# TODO: replace this with Slack integration
run: |
echo "I failed!"
uses: 8398a7/action-slack@v3
with:
status: custom
custom_payload: |
{
attachments: [{
color: 'danger',
text: ':x: Failure\nDaily health check failed for *<https://github.com/metagraph-dev/metagraph-stellargraph/actions?query=workflow%3A%22Daily+Checkup%22|metagraph-stellargraph>*'
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
3 changes: 1 addition & 2 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,11 @@ jobs:
conda update -c ${{ env.CHANNELS }} metagraph-stellargraph
conda list
- name: Pytest
# TODO: add `pytest --pyargs metagraph_stellargraph` once tests actually exist
run: |
source "$CONDA/etc/profile.d/conda.sh"
conda activate mg
python -c 'import stellargraph'
python -c 'import metagraph_stellargraph.plugins; assert metagraph_stellargraph.plugins.has_stellargraph'
pytest --pyargs metagraph_stellargraph
python -m metagraph.tests
python -m metagraph.tests --dask
Expand Down
2 changes: 1 addition & 1 deletion metagraph_stellargraph/plugins/stellargraph/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def sg_connected_components(graph: StellarGraph) -> PythonNodeMapType:
index_to_label[node] = i
return index_to_label

@concrete_algorithm("util.graph_sage_node_embedding.apply")
@concrete_algorithm("embedding.apply.graph_sage")
def sg_graph_sage_node_embedding_apply(
embedding: StellarGraphGraphSageNodeEmbedding,
graph: NetworkXGraph,
Expand Down
5 changes: 5 additions & 0 deletions metagraph_stellargraph/tests/test_basics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from metagraph_stellargraph.plugins import has_stellargraph


def test_import():
assert has_stellargraph

0 comments on commit 3a4e535

Please sign in to comment.