Rename emailer lib #140
This file contains hidden or 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: Build and Deploy | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| concurrency: ci-${{ github.ref }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| actions: write | |
| contents: write | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v4 | |
| # python ---- | |
| - uses: actions/checkout@v2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Install nbmail | |
| run: uv pip install -e . | |
| # quarto docs build ---- | |
| - uses: quarto-dev/quarto-actions/setup@v2 | |
| # with: | |
| # tinytex: true | |
| - name: Build docs | |
| run: | | |
| cd docs && uv run quartodoc build --verbose && uv run quarto render | |
| - name: Deploy | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| with: | |
| force: false | |
| folder: docs/_site | |
| clean-exclude: pr-preview | |
| - name: Deploy (preview) | |
| uses: rossjrw/pr-preview-action@v1 | |
| # if in a PR | |
| if: ${{ github.event_name == 'pull_request' }} | |
| with: | |
| source-dir: docs/_site | |
| test-nbmail: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.12"] | |
| fail-fast: false | |
| permissions: | |
| pull-requests: write | |
| actions: write | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Install nbmail | |
| run: uv pip install -e . | |
| - name: Install the project deps | |
| run: uv pip install -e .[dev] | |
| - name: Test nbmail | |
| run: | | |
| uv run pytest nbmail/tests/ --cov=nbmail --cov-report=xml --cov-report=term-missing | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@v4 | |
| if: ${{ matrix.python-version == '3.12' }} | |
| with: | |
| file: nbmail/coverage.xml | |
| flags: nbmail |