Added ability to disable and enable plugins / Commands based on YAML. #16
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: lint and test | |
on: [push, pull_request] | |
jobs: | |
ruff-black-isort: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: chartboost/ruff-action@v1 | |
- name: Install dependencies | |
run: | | |
pipx install poetry | |
poetry install | |
- name: black check | |
run: poetry run black --check --preview . | |
- name: isort check | |
run: poetry run isort --profile black --check . | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install universal-ctags (Ubuntu) | |
if: runner.os == 'Linux' | |
run: sudo apt update && sudo apt install universal-ctags | |
- name: Install universal-ctags (OSX) | |
if: runner.os == 'macOS' | |
run: brew update && brew install universal-ctags | |
- name: Install universal-ctags (Windows) | |
if: runner.os == 'Windows' | |
run: choco install universal-ctags | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pipx install poetry | |
poetry install | |
- name: Check types with pyright | |
run: | | |
poetry run pyright | |
- name: Test with pytest | |
run: | | |
poetry run pytest | |
- name: Can run Mentat | |
# Unfortunately Github Actions Runners have trouble with prompt toolkit, so we can't do this on Windows. | |
if: runner.os != 'Windows' | |
# Ensure that python doesn't import local mentat folder and that 'mentat' command calls mentat instead of switching folders. | |
working-directory: ./testbed | |
run: | | |
poetry run mentat . | |
license-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
pipx install poetry | |
poetry install | |
- name: Run license checking script | |
run: | | |
poetry run python tests/license_check.py |