Skip to content

Commit

Permalink
Update 84_test_error.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaydon2005 authored Jul 30, 2024
1 parent 435065a commit b860c4f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/84_test_error.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,41 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest # You only need one OS matrix for nightly builds

env:
PYTHON: '3.9'

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test and generate coverage report
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true

- name: Notify Slack on failure
if: failure() # This step runs only if previous steps fail
uses: slackapi/slack-github-action@v1
uses: Ilshidur/action-slack@v2
with:
channel-id: 'YOUR_CHANNEL_ID'
text: 'The nightly build failed. Please check the build logs.'
args: |
--channel '#your-channel'
--text 'The nightly build failed. Please check the build logs.'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit b860c4f

Please sign in to comment.