Skip to content

Commit

Permalink
Merge pull request #52 from AllSpiceIO/kd/add_cron
Browse files Browse the repository at this point in the history
CI: Add cron
  • Loading branch information
kdumontnu authored Oct 27, 2023
2 parents 787afb8 + 065363e commit 7fa7692
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @AllSpiceIO/devs
32 changes: 31 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ on:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 5 * * *"

jobs:
test:
name: Test py-allspice
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
if: github.repository == 'AllSpiceIO/py-allspice'

services:
Expand Down Expand Up @@ -94,3 +96,31 @@ jobs:
- name: Test with pytest
run: |
python -m pytest
# We might want to consider moving this to a new workflow if we add addition test jobs
notifications:
name: Notifications
runs-on: ubuntu-22.04
needs: [test]
if: always()
steps:
- name: Slack Notification
uses: slackapi/slack-github-action@v1
with:
payload: |
{
"attachments": [
{
"color": "${{ needs.test.result == 'success' && 'good' || needs.test.result == 'failure' && 'danger' || 'warning' }}",
"fields": [
{
"title": "py-allspice CI: ${{ needs.test.result }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}",
"value": "GitHub Action build result: ${{ needs.test.result }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DEV_CI }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 comments on commit 7fa7692

Please sign in to comment.