diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 68f84b7..8e30c07 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,39 +1,63 @@ name: tests on: + push: + branches: [main] pull_request: - branches: ["master"] + branches: [main] + workflow_dispatch: jobs: tests: - name: "py${{ matrix.python-version }} / ${{ matrix.os }} / PyYAML~=${{ matrix.pyyaml-version }}" + name: py${{ matrix.python-version }} / ${{ matrix.os }} / PyYAML~=${{ matrix.pyyaml-version }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["2.7", "3.6"] - pyyaml-version: ["3.13", "4.2b4", "5.4"] + os: [ubuntu-latest, windows-latest] + python-version: ["3.9"] + pyyaml-version: ["4.2b4", "5.4", "6.0"] include: - - { os: ubuntu-latest, python-version: "3.10", pyyaml-version: "6.0" } - - { os: macos-latest, python-version: "3.10", pyyaml-version: "6.0" } - - { os: windows-latest, python-version: "3.10", pyyaml-version: "6.0" } + - { os: ubuntu-latest, python-version: "3.7", pyyaml-version: "3.13" } + - { os: windows-latest, python-version: "3.7", pyyaml-version: "3.13" } + - { os: ubuntu-latest, python-version: "3.13", pyyaml-version: "6.0" } + - { os: macos-latest, python-version: "3.13", pyyaml-version: "6.0" } + - { os: windows-latest, python-version: "3.13", pyyaml-version: "6.0" } steps: - - uses: "actions/checkout@v2" - - uses: "actions/setup-python@v2" + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: "${{ matrix.python-version }}" + python-version: ${{ matrix.python-version }} architecture: x64 - - name: "Install" - run: | - python -VV - python -m pip install -q pytest pytest-cov pyyaml~=${{ matrix.pyyaml-version }} -e . - python -m pip freeze --all - - name: "Run tests py${{ matrix.python-version }} / ${{ matrix.os }} / PyYAML~=${{ matrix.pyyaml-version }}" + - name: Install + run: python -m pip install -q pytest pytest-cov pyyaml~=${{ matrix.pyyaml-version }} -e . + - name: Run tests py${{ matrix.python-version }} / ${{ matrix.os }} / PyYAML~=${{ matrix.pyyaml-version }} run: python -m pytest --cov-branch --cov=oyaml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + + tests-27: + name: Python 2.7 on ubuntu-20.04 + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + pyyaml-version: ["3.13", "4.2b4", "5.4"] + + container: + image: python:2.7-buster + steps: + - uses: actions/checkout@v4 + - name: Install + run: python -m pip install -q pytest pytest-cov pyyaml~=${{ matrix.pyyaml-version }} -e . + - name: Run tests py${{ matrix.python-version }} / ${{ matrix.os }} / PyYAML~=${{ matrix.pyyaml-version }} + run: python -m pytest --cov-branch --cov=oyaml - name: Upload coverage to Codecov - uses: "codecov/codecov-action@v1" + uses: codecov/codecov-action@v4 with: - fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.rst b/README.rst index f45806f..d8cdee8 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -|actions|_ |codecov|_ |pypi|_ |womm|_ +|actions| |codecov| |pypi| |womm| .. |actions| image:: https://github.com/wimglenn/oyaml/actions/workflows/tests.yml/badge.svg .. _actions: https://github.com/wimglenn/oyaml/actions/workflows/tests.yml