Remove Coveralls (RIP) #155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
- release | |
- push | |
- pull_request | |
jobs: | |
lint: | |
name: Run lint checks | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: "3.11" | |
cache: true | |
- name: Install dependencies | |
# NOTE: test is needed here to evaluate imports for pytest | |
run: pdm sync -d -G lint,test | |
- name: Run lint checks | |
run: pdm run lint | |
test: | |
name: Run tests | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
# Versions available: | |
# pypy: https://downloads.python.org/pypy/versions.json | |
# Python: https://github.com/actions/python-versions/blob/main/versions-manifest.json | |
# Additional info: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md | |
# OS images: https://github.com/actions/runner-images | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
architecture: | |
- x86 | |
- x64 | |
platform: | |
- ubuntu-20.04 | |
- windows-latest | |
# Fix tests failing on MacOS 14+ due to ARM architecture | |
# https://github.com/actions/setup-python/issues/825 | |
# TODO: update tests to use ARM MacOS with 14+, add | |
# architecture to the list of architectures above. | |
- macos-13 | |
exclude: | |
- platform: ubuntu-20.04 | |
architecture: x86 | |
- platform: macos-13 | |
architecture: x86 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.architecture }} | |
- name: Display platform and environment information | |
run: | | |
python --version | |
pdm run python --version | |
python -c "import sys; print('sys.version: %s' % str(sys.version))" | |
python -c "import sys; print('sys.platform: %s' % str(sys.platform))" | |
python -c "import os; print('os.name: %s' % str(os.name))" | |
python -c "import platform; print('platform.uname(): %s' % str(platform.uname()))" | |
- name: Install dependencies | |
run: pdm sync -d -G test,ci | |
# TODO: fix benchmark results (maybe a separate Job?) | |
- name: Run tests | |
run: pdm run test | |
- uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: false | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# TODO: publish releases using CI | |
# TODO: don't publish pre-releases OR publish them as pre-releases to PyPI | |
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/ | |
# https://pdm-project.org/en/latest/usage/publish/ | |
# name: "Build and publish a release" | |
# on: | |
# release: | |
# types: [released] | |
# jobs: | |
# pypi-publish: | |
# name: Publish release to PyPI | |
# runs-on: "ubuntu-22.04" | |
# permissions: | |
# # This permission is needed for private repositories. | |
# contents: read | |
# # IMPORTANT: this permission is mandatory for trusted publishing | |
# id-token: write | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Setup PDM | |
# uses: pdm-project/setup-pdm@v4 | |
# with: | |
# python-version: "3.11" | |
# - name: Publish package distributions to PyPI | |
# run: pdm publish |