diff --git a/.github/workflows/python-tests-with-tox.yml b/.github/workflows/python-tests-with-tox.yml deleted file mode 100644 index ce9e959..0000000 --- a/.github/workflows/python-tests-with-tox.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Tests with tox - -on: - push: - paths: - - "folktexts/**" - - "tests/**" - - "requirements/**" - - "pyproject.toml" - pull_request: - paths: - - "folktexts/**" - - "tests/**" - - "requirements/**" - - "pyproject.toml" - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install tox tox-gh-actions - - name: Test with tox - run: tox diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 10a9f3d..bed5ffe 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -1,50 +1,35 @@ -# 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: Tests +name: Tests with tox on: push: - paths-ignore: - - 'examples/**' - - 'docs/**' - - 'README.md' - - 'LICENSE' - - '.gitignore' - + paths: + - "folktexts/**" + - "tests/**" + - "requirements/**" + - "pyproject.toml" pull_request: - branches: - - main + paths: + - "folktexts/**" + - "tests/**" + - "requirements/**" + - "pyproject.toml" jobs: build: - runs-on: ubuntu-latest strategy: - fail-fast: false matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install ".[tests]" - # ^ install local package with extra test dependencies - - - name: Lint with flake8 - continue-on-error: true - run: | - flake8 folktexts tests --count --statistics - - - name: Test with pytest - run: | - coverage run -m pytest tests && coverage report -m - # TODO: $ coverage run -m pytest tests && coverage report -m --fail-under=75 + python -m pip install tox tox-gh-actions + - name: Test with tox + run: tox