Skip to content

Various minor fixes #17

Various minor fixes

Various minor fixes #17

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Tests
on:
push:
branches: ['master']
pull_request:
branches: ['master']
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install libime
run: sudo apt install -y libime-bin
- name: Install Poetry
run: pipx install poetry
- name: Set up Python 3.12
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: '3.12'
cache: 'poetry'
- name: Install dependencies
run: |
poetry install
poetry env info
poetry show
- name: Lint with yapf
run: poetry run yapf -i -r mw2fcitx
- name: Test with pytest
run: |
poetry run coverage erase
poetry run coverage run -m pytest tests/
poetry run coverage run -a -m mw2fcitx.main -c tests/cli/conf_one.py
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}