trying to add slack notification
@@ -5,17 +5,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: [3.7, 3.8]
+ python-version: [3.8]
steps:
+
- uses: actions/checkout@v2
+
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
+
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/python3.txt
+
- name: Test with pytest
env:
CONSUMER_KEY: ${{ secrets.consumer_key }}
@@ -23,3 +27,23 @@ jobs:
ACCESS_TOKEN: ${{ secrets.access_token }}
ACCESS_TOKEN_SECRET: ${{ secrets.access_token_secret }}
run: python setup.py test
+
+ - name: notify slack success
+ if: success()
+ env:
+ SLACK_BOT_TOKEN: ${{ secrets.slack_bot_token }}
+ uses: voxmedia/github-action-slack-notify-build@v1
+ with:
+ channel: development
+ status: SUCCESS
+ color: good
+
+ - name: notify slack fail
+ if: failure()
+ env:
+ SLACK_BOT_TOKEN: ${{ secrets.slack_bot_token }}
+ uses: voxmedia/github-action-slack-notify-build@v1
+ with:
+ channel: development
+ status: FAILED
+ color: danger
