From b7f70e438c47e0eee117d83fb2bbd346e6a9cd57 Mon Sep 17 00:00:00 2001 From: Alec Rosenbaum Date: Mon, 24 Jun 2024 14:56:27 -0400 Subject: [PATCH] Add simple github action to run tests (#42) * add simple github action to run tests * fix matrix names * bump lxml * drop circleci config * drop circleci image from the readme --- .circleci/config.yml | 52 ------------------------------------- .github/workflows/test.yaml | 46 ++++++++++++++++++++++++++++++++ README.rst | 2 -- requirements_tests.txt | 5 ++-- 4 files changed, 48 insertions(+), 57 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/test.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 39e9d1f..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,52 +0,0 @@ -version: 2 - -workflows: - version: 2 - workflow: - jobs: - - test-3.7 - - test-3.8 - - test-3.9 - - test-3.10 - - static-code-analysis - -defaults: &defaults - working_directory: ~/code - steps: - - checkout - - run: - name: Install Python dependencies - command: CFLAGS="-O0" pip install -r requirements_tests.txt - - run: - name: Test - command: pytest - -jobs: - test-3.7: - <<: *defaults - docker: - - image: cimg/python:3.7 - test-3.8: - <<: *defaults - docker: - - image: cimg/python:3.8 - test-3.9: - <<: *defaults - docker: - - image: cimg/python:3.9 - test-3.10: - <<: *defaults - docker: - - image: cimg/python:3.10 - static-code-analysis: - working_directory: ~/code - docker: - - image: cimg/python:3.8 - steps: - - checkout - - run: - name: Install dependencies - command: pip install lintlizard==0.18.0 "click<8.1" - - run: - name: LintLizard - command: lintlizard diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..2b95118 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,46 @@ +name: test-workflow +on: + # When any branch in the repository is pushed + push: + # When a pull request is created + pull_request: + # When manually triggered to run + workflow_dispatch: + +jobs: + lint: + strategy: + matrix: + python-version: [ '3.8', '3.9', '3.10', '3.11' ] + name: Lint ${{ matrix.python-version }} + runs-on: 'ubuntu-20.04' + container: python:${{ matrix.python-version }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Lint code + run: | + pip install lintlizard==0.18.0 "click<8.1" + lintlizard + + # Run tests + test: + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11'] + # Do not cancel any jobs when a single job fails + fail-fast: false + name: Python ${{ matrix.python-version }} + runs-on: 'ubuntu-20.04' + container: python:${{ matrix.python-version }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: | + CFLAGS="-O0" pip install -r requirements_tests.txt + + - name: Run tests + run: pytest diff --git a/README.rst b/README.rst index 90619cf..3da98d2 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,6 @@ ========== quotequail ========== -.. image:: https://circleci.com/gh/closeio/quotequail/tree/master.svg?style=svg&circle-token=493e282bf7e3bf5e72bf3e255a116534ed8a79ab - :target: https://circleci.com/gh/closeio/quotequail/tree/master A library that identifies quoted text in plain text and HTML email messages. quotequail has no mandatory dependencies, however using HTML methods require diff --git a/requirements_tests.txt b/requirements_tests.txt index a5e19eb..684f879 100644 --- a/requirements_tests.txt +++ b/requirements_tests.txt @@ -1,3 +1,2 @@ ---no-binary lxml -lxml==4.9.1 -pytest==7.1.3 \ No newline at end of file +lxml==5.1.0 +pytest==7.1.3