Bump mypy from 1.11.1 to 1.12.1 #446
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Python Setup | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Pre-commit Checks | |
uses: pre-commit/[email protected] | |
- name: Type Checks | |
run: | | |
pip install poetry | |
poetry install | |
poetry run mypy nexus_pcv | |
test: | |
name: Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
python: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Python Setup | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Test | |
run: | | |
pip install poetry | |
poetry install | |
poetry run pytest | |
notification: | |
name: Notification | |
if: always() && github.event_name != 'pull_request' | |
needs: [lint, test] | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Check Job Success | |
run: | | |
if [ ${{ needs.lint.result }} == 'success' ] && [ ${{ needs.test.result }} == 'success' ]; then | |
echo "All jobs succeeded" | |
echo "jobSuccess=success" >> $GITHUB_ENV | |
else | |
echo "Not all jobs succeeded" | |
echo "jobSuccess=fail" >> $GITHUB_ENV | |
fi | |
id: print_status | |
- name: Webex Notification | |
if: always() | |
uses: qsnyder/action-wxt@master | |
env: | |
TOKEN: ${{ secrets.WEBEX_TOKEN }} | |
ROOMID: ${{ secrets.WEBEX_ROOM_ID }} | |
MESSAGE: | | |
[**[${{ env.jobSuccess }}] ${{ github.repository }} #${{ github.run_number }}**](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
* Commit: [${{ github.event.head_commit.message }}](${{ github.event.head_commit.url }})[${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) | |
* Author: ${{ github.event.sender.login }} | |
* Branch: ${{ github.ref }} ${{ github.head_ref }} | |
* Event: ${{ github.event_name }} |