Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 project update #3

Merged
merged 4 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
- package-ecosystem: pip
directory: /.github/workflows
schedule:
interval: monthly
- package-ecosystem: pip
directory: /docs
schedule:
interval: monthly
- package-ecosystem: pip
directory: /
schedule:
interval: monthly
versioning-strategy: lockfile-only
allow:
- dependency-type: all
93 changes: 0 additions & 93 deletions .github/semantic_release/release_notes.hbs

This file was deleted.

28 changes: 15 additions & 13 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
name: Lint

on:
pull_request:
branches: ["**"]

jobs:
lint:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Set up Github Workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python Environment 3.10
uses: actions/setup-python@v4
- name: Set up Python Environment
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
python -m pip install -q hatch
hatch env create
python -m pip install --upgrade pip wheel
python -m pip install -q hatch pre-commit
hatch --version
- name: Create Environment
run: hatch env create lint
- name: Lint
id: lint
continue-on-error: true
run: |
echo "::add-matcher::.github/workflows/matchers/flake8.json"
hatch run lint
hatch run lint:style
echo "::remove-matcher owner=flake8::"
- name: Code Checker
- name: Type Checking
id: check
continue-on-error: true
run: |
echo "::add-matcher::.github/workflows/matchers/mypy.json"
hatch run check
hatch run lint:typing
echo "::remove-matcher owner=mypy::"
- name: Raise Errors For Linting Failures
- name: Raise Errors For Failures
if: |
steps.lint.outcome != 'success' ||
steps.check.outcome != 'success'
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
name: Publishing

on:
release:
types:
- published

jobs:
pypi-publish:
name: PyPI
if: github.repository_owner == 'juftin'
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.job }}
cancel-in-progress: false
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
python -m pip install -q hatch
python -m pip install -q hatch pre-commit
hatch --version
- name: Build package
run: |
hatch build
- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@v1.6.4
uses: pypa/gh-action-pypi-publish@v1.8.11
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
77 changes: 48 additions & 29 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,65 +1,84 @@
name: Release
on:
push:
branches: [main, next, beta, alpha, "*.x"]
branches:
- main
- next
- beta
- alpha
- "*.x"
jobs:
release:
name: Release
name: github-release
if: github.repository_owner == 'juftin'
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.job }}
cancel-in-progress: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check out the repository
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 2
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
python -m pip install -q hatch
hatch env create
python -m pip install -q hatch pre-commit
hatch -v env create
hatch --version
- name: Release
run: hatch run semantic-release
run: hatch run gen:release
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com

github-pages-publish:
runs-on: ubuntu-latest
needs: release
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && github.repository_owner == 'juftin'
permissions:
contents: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
concurrency:
group: ${{ github.workflow }}-${{ github.job }}
cancel-in-progress: false
steps:
- name: Checkout Latest Changes
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
fetch-depth: 0
uses: actions/checkout@v4
- name: Set up Python Environment
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Install Hatch
run: |
python -m pip install --upgrade pip
python -m pip install -q hatch
hatch env create
python -m pip install --upgrade pip wheel
python -m pip install -q hatch pre-commit
hatch --version
- name: Set Up GitHub Actions User
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Deploy Documentation Changes
run: hatch run docs-deploy --force
- name: Create Virtual Environment
run: hatch env create docs
- name: Build Site
run: hatch run docs:build
- name: Setup GitHub Pages
uses: actions/configure-pages@v4
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: site/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
18 changes: 12 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: Tests

on:
push:
branches:
- main
paths:
- textual_universal_directorytree/**
- tests/**
- pyproject.toml
- .github/workflows/tests.yaml
pull_request:
branches: ["**"]
paths:
- textual_universal_directorytree/**
- tests/**
- pyproject.toml
- .github/workflows/tests.yaml
schedule:
Expand All @@ -27,22 +28,27 @@ jobs:
- { name: Python 3.10, python: "3.10" }
- { name: Python 3.9, python: "3.9" }
- { name: Python 3.8, python: "3.8" }
concurrency:
group: ${{ github.workflow }}-${{ matrix.python }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Set up Github Workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python Environment ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Hatch
run: |
python -m pip install --upgrade pip
python -m pip install -q hatch
python -m pip install -q --upgrade pip wheel
python -m pip install -q hatch pre-commit
hatch --version
- name: Create Environment
run: hatch --env all run +py=${{ matrix.python }} -- python --version
- name: Test Suite
run: |
echo "::add-matcher::.github/workflows/matchers/python.json"
hatch run +py="${{ matrix.python }}" test:matrix
hatch run +py=${{ matrix.python }} all:cov
echo "::remove-matcher owner=python::"
Loading