diff --git a/.github/workflows/py37.yml b/.github/workflows/py37.yml deleted file mode 100644 index 1edd24e..0000000 --- a/.github/workflows/py37.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: pytest_py37 - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - python-version: 3.7 - channels: conda-forge - - - name: Install dependencies - run: | - conda install pip setuptools wheel tox coverage[toml] - - - name: Test with tox - run: tox -e py37 - - # from https://github.com/codecov/codecov-action - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - files: ./coverage.xml - fail_ci_if_error: true - verbose: true diff --git a/.github/workflows/py38.yml b/.github/workflows/py38.yml deleted file mode 100644 index 61194a4..0000000 --- a/.github/workflows/py38.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: pytest_py38 - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - python-version: 3.8 - channels: conda-forge - - - name: Install dependencies - run: | - conda install pip setuptools wheel tox coverage[toml] - - - name: Test with tox - run: tox -e py38 - - # from https://github.com/codecov/codecov-action - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - files: ./coverage.xml - fail_ci_if_error: true - verbose: true diff --git a/.github/workflows/py39.yml b/.github/workflows/py39.yml deleted file mode 100644 index 8af037a..0000000 --- a/.github/workflows/py39.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: pytest_py39 - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - python-version: 3.9 - channels: conda-forge - - - name: Install dependencies - run: | - conda install pip setuptools wheel tox coverage[toml] - - - name: Test with tox - run: tox -e py39 - - # from https://github.com/codecov/codecov-action - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - files: ./coverage.xml - fail_ci_if_error: true - verbose: true diff --git a/.github/workflows/py36.yml b/.github/workflows/tests.yml similarity index 64% rename from .github/workflows/py36.yml rename to .github/workflows/tests.yml index bb7e235..93d4001 100644 --- a/.github/workflows/py36.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: pytest_py36 +name: Tests on: push: @@ -8,7 +8,11 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.platform }} + strategy: + matrix: + platform: [ubuntu-latest, macos-latest] + python-version: [3.6, 3.7, 3.8, 3.9] defaults: run: shell: bash -l {0} @@ -17,20 +21,22 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: activate-environment: test - python-version: 3.6 + python-version: ${{ matrix.python-version }} channels: conda-forge - name: Install dependencies run: | conda install pip setuptools wheel tox coverage[toml] + python -m pip install tox-gh-actions - name: Test with tox - run: tox -e py36 + run: tox # from https://github.com/codecov/codecov-action - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v2 with: + env_vars: OS,PYTHON files: ./coverage.xml fail_ci_if_error: true verbose: true diff --git a/tox.ini b/tox.ini index ea98a22..7c542db 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] -minversion = 3.14.0 -requires=tox-conda +minversion = 3.24.0 +requires=tox-conda==0.9.2 envlist = build docs @@ -12,10 +12,12 @@ envlist = #report ignore_basepython_conflict = true -#[gh-actions] -#python = -# 3.6: py36 -# 3.7: py37, build, docs +[gh-actions] +python = + 3.6: py36 + 3.7: py37 + 3.8: py38 + 3.9: py39 [testenv] basepython =