From a06cfa6e2c818705547820cd4523e8382975a1b5 Mon Sep 17 00:00:00 2001 From: Karl Brown Date: Sat, 20 Apr 2024 18:29:50 -0400 Subject: [PATCH] Adds initial ci workflow, additional linters --- .github/workflows/ci.yaml | 32 ++++++++++++++++++++++++++++++++ .pre-commit-config.yaml | 6 +++++- pyproject.toml | 7 ++++--- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..9247867 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,32 @@ +--- +name: CI +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + workflow_dispatch: + +permissions: + contents: read + +jobs: + ci: + strategy: + fail-fast: true + matrix: + python-version: ["3.10"] + poetry-version: ["1.8.2"] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Python Poetry Action + uses: abatilo/actions-poetry@v3 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Run tests + run: make test diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 910569b..0a2ea7e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,10 +5,14 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0 hooks: + - id: check-yaml - id: end-of-file-fixer - id: mixed-line-ending - id: trailing-whitespace - + - repo: https://github.com/rhysd/actionlint + rev: c6bd06256dd700a45e483869bcdcf304239393a6 # frozen: v1.6.27 + hooks: + - id: actionlint-system - repo: https://github.com/executablebooks/mdformat rev: 08fba30538869a440b5059de90af03e3502e35fb # frozen: 0.7.17 hooks: diff --git a/pyproject.toml b/pyproject.toml index f49c6a5..9d40758 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,11 @@ [tool.poetry] -name = "md2enex" -version = "0.2" -description = "Converts markdown to Evernote ENEX files so they can be imported" authors = ["karloskalcium"] +description = "Converts markdown to Evernote ENEX files so they can be imported" license = "MIT" +name = "md2enex" readme = "README.md" +repository = "https://github.com/karloskalcium/md2enex" +version = "0.2" [tool.poetry.dependencies] python = "^3.10"