Skip to content

Commit

Permalink
Add CI testing using GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
taleinat committed Jun 25, 2024
1 parent f17772e commit fcf0c33
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 9 deletions.
158 changes: 158 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: build
on: [push, pull_request, workflow_dispatch]
jobs:
test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- name: 'py38 (Ubuntu)'
python: '3.8'
toxpython: 'python3.8'
python_arch: 'x64'
tox_env: 'py38-with_coverage'
os: 'ubuntu-latest'
- name: 'py38 (Windows)'
python: '3.8'
toxpython: 'python3.8'
python_arch: 'x64'
tox_env: 'py38-with_coverage'
os: 'windows-latest'
- name: 'py38 (macOS)'
python: '3.8'
toxpython: 'python3.8'
python_arch: 'arm64'
tox_env: 'py38-with_coverage'
os: 'macos-latest'
- name: 'py39 (Ubuntu)'
python: '3.9'
toxpython: 'python3.9'
python_arch: 'x64'
tox_env: 'py39-with_coverage'
os: 'ubuntu-latest'
- name: 'py39 (Windows)'
python: '3.9'
toxpython: 'python3.9'
python_arch: 'x64'
tox_env: 'py39-with_coverage'
os: 'windows-latest'
- name: 'py39 (macOS)'
python: '3.9'
toxpython: 'python3.9'
python_arch: 'arm64'
tox_env: 'py39-with_coverage'
os: 'macos-latest'
- name: 'py310 (Ubuntu)'
python: '3.10'
toxpython: 'python3.10'
python_arch: 'x64'
tox_env: 'py310-with_coverage'
os: 'ubuntu-latest'
- name: 'py310 (Windows)'
python: '3.10'
toxpython: 'python3.10'
python_arch: 'x64'
tox_env: 'py310-with_coverage'
os: 'windows-latest'
- name: 'py310 (macOS)'
python: '3.10'
toxpython: 'python3.10'
python_arch: 'arm64'
tox_env: 'py310-with_coverage'
os: 'macos-latest'
- name: 'py311 (Ubuntu)'
python: '3.11'
toxpython: 'python3.11'
python_arch: 'x64'
tox_env: 'py311-with_coverage'
os: 'ubuntu-latest'
- name: 'py311 (Windows)'
python: '3.11'
toxpython: 'python3.11'
python_arch: 'x64'
tox_env: 'py311-with_coverage'
os: 'windows-latest'
- name: 'py311 (macOS)'
python: '3.11'
toxpython: 'python3.11'
python_arch: 'arm64'
tox_env: 'py311-with_coverage'
os: 'macos-latest'
- name: 'py312 (Ubuntu)'
python: '3.12'
toxpython: 'python3.12'
python_arch: 'x64'
tox_env: 'py312-with_coverage'
os: 'ubuntu-latest'
- name: 'py312 (Windows)'
python: '3.12'
toxpython: 'python3.12'
python_arch: 'x64'
tox_env: 'py312-with_coverage'
os: 'windows-latest'
- name: 'py312 (macOS)'
python: '3.12'
toxpython: 'python3.12'
python_arch: 'arm64'
tox_env: 'py312-with_coverage'
os: 'macos-latest'
- name: 'pypy39 (Ubuntu)'
python: 'pypy-3.9'
toxpython: 'pypy3.9'
python_arch: 'x64'
tox_env: 'pypy39-with_coverage'
os: 'ubuntu-latest'
- name: 'pypy39 (Windows)'
python: 'pypy-3.9'
toxpython: 'pypy3.9'
python_arch: 'x64'
tox_env: 'pypy39-with_coverage'
os: 'windows-latest'
- name: 'pypy39 (macOS)'
python: 'pypy-3.9'
toxpython: 'pypy3.9'
python_arch: 'arm64'
tox_env: 'pypy39-with_coverage'
os: 'macos-latest'
- name: 'pypy310 (Ubuntu)'
python: 'pypy-3.10'
toxpython: 'pypy3.10'
python_arch: 'x64'
tox_env: 'pypy310-with_coverage'
os: 'ubuntu-latest'
- name: 'pypy310 (Windows)'
python: 'pypy-3.10'
toxpython: 'pypy3.10'
python_arch: 'x64'
tox_env: 'pypy310-with_coverage'
os: 'windows-latest'
- name: 'pypy310 (macOS)'
python: 'pypy-3.10'
toxpython: 'pypy3.10'
python_arch: 'arm64'
tox_env: 'pypy310-with_coverage'
os: 'macos-latest'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.python_arch }}
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install --progress-bar=off 'coverage ~= 7.5' 'tox ~= 4.9' 'virtualenv ~= 20.26'
virtualenv --version
pip --version
tox --version
pip list --format=freeze
- name: test
env:
TOXPYTHON: '${{ matrix.toxpython }}'
run: >
tox -e ${{ matrix.tox_env }} -v
21 changes: 12 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
[tox]
envlist = {py38,py39,py310,py311,py312,pypy39,pypy310}-{with,without}_coverage
envlist =
{py38,py39,py310,py311,py312,pypy39,pypy310}-{with,without}_coverage

[testenv]
install_command =
{envpython} -m pip install -vvv {opts} {packages}
; setenv =
; ; The following two flags are a workaround for an issue with building
; ; Python extensions on OSX with xcode 5.1.
; ; See: http://stackoverflow.com/questions/22313407/
; CFLAGS=-Qunused-arguments
; CPPFLAGS=-Qunused-arguments
basepython =
py38: {env:TOXPYTHON:python3.8}
py39: {env:TOXPYTHON:python3.9}
py310: {env:TOXPYTHON:python3.10}
py311: {env:TOXPYTHON:python3.11}
py312: {env:TOXPYTHON:python3.12}
pypy39: {env:TOXPYTHON:pypy3.9}
pypy310: {env:TOXPYTHON:pypy3.10}
deps =
; use specific versions of testing tools with which this is known to work
with_coverage: coverage>=5,<6
{py38,py39,py310,py311,py312,pypy39,pypy310}: biopython
setenv =
PYTHONUNBUFFERED=yes
allowlist_externals =
mv
commands =
Expand Down

0 comments on commit fcf0c33

Please sign in to comment.