Skip to content

Update dependencies and tooling #416

Update dependencies and tooling

Update dependencies and tooling #416

Workflow file for this run

name: Tests
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.python }}
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [Ubuntu, macOS, Windows]
python: ["3.9"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: poetry
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run pytest tests --cov jekyllnb --cov-report xml:coverage.xml
- name: Upload coverage report
uses: codecov/codecov-action@v4
if: success()
with:
file: coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Send Slack message on failure
uses: lazy-actions/[email protected]
if: failure()
with:
type: ${{ job.status }}
job_name: '${{ runner.os }} :snake: ${{ matrix.python }} Tests'
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}
slack:
name: Slack
runs-on: ubuntu-latest
needs: test
steps:
- name: Send Slack message
uses: lazy-actions/[email protected]
if: always()
with:
type: ${{ job.status }}
job_name: ':snake: Tests'
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}