Add new moderation event types and correct present buttons #226
Workflow file for this run
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: Type Coverage and Linting | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: [opened, reopened, synchronize] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11", "3.x"] | |
name: "Type Coverage and Linting @ ${{ matrix.python-version }}" | |
steps: | |
- name: "Checkout Repository" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: "Load cached poetry installation @ ${{ matrix.python-version }}" | |
id: cached-poetry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local | |
key: poetry-0 | |
- name: "Setup Poetry @ ${{ matrix.python-version }}" | |
if: steps.cached-poetry.outputs.cache-hit != 'true' | |
uses: snok/install-poetry@v1 | |
with: | |
version: latest | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
virtualenvs-path: .venv | |
- name: "Setup Python @ ${{ matrix.python-version }}" | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
cache: "poetry" | |
- name: "Load cached venv @ ${{ matrix.python-version }}" | |
id: cached-pip-wheels | |
uses: actions/cache@v3 | |
with: | |
path: .venv/ | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: "Install Python deps @ ${{ matrix.python-version }}" | |
if: ${{ steps.cached-pip-wheels.outputs.cache-hit != 'true' }} | |
id: install-deps | |
run: | | |
poetry install --no-interaction | |
- name: Activate venv @ ${{ matrix.python-version }} | |
run: | | |
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH | |
- name: "Run Pyright @ ${{ matrix.python-version }}" | |
uses: jakebailey/pyright-action@v1 | |
with: | |
warnings: false | |
no-comments: ${{ matrix.python-version != '3.x' }} | |
- name: Lint | |
if: ${{ always() && steps.install-deps.outcome == 'success' }} | |
uses: chartboost/ruff-action@v1 |