Skip to content

Constructing more BitStores from class methods. #83

Constructing more BitStores from class methods.

Constructing more BitStores from class methods. #83

Workflow file for this run

name: CI
on:
push:
branches:
- stable
- main
tags:
- v*
pull_request:
branches:
- '**'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
name: Build ${{ matrix.os.name }} ${{ matrix.python.name }}
runs-on: ${{ matrix.os.runs-on }}
strategy:
fail-fast: false
matrix:
os:
- name: 🐧
runs-on: ubuntu-latest
python:
- name: CPython 3.10
major_dot_minor: '3.10'
action: '3.10'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
# This allows the matrix to specify just the major.minor version while still
# expanding it to get the latest patch version including alpha releases.
# This avoids the need to update for each new alpha, beta, release candidate,
# and then finally an actual release version. actions/setup-python doesn't
# support this for PyPy presently so we get no help there.
#
# CPython -> 3.9.0-alpha - 3.9.X
# PyPy -> pypy-3.7
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python.action), matrix.python.action))[startsWith(matrix.python.action, 'pypy')] }}
architecture: x64
- name: Setup environment
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build sdist and wheel
run: |
python -m build
- name: Publish package files
if: always()
uses: actions/upload-artifact@v3
with:
name: packages
path: dist/*
if-no-files-found: error
test:
name: Test ${{ matrix.os.name }} ${{ matrix.python.name }}
needs:
- build
runs-on: ${{ matrix.os.runs-on }}
strategy:
fail-fast: false
matrix:
os:
- name: 🐧
runs-on: ubuntu-latest
- name: 🍎
# This would preferably be macos-latest, but it has pip updating bugs right now.
runs-on: macos-12
- name: 🪟
runs-on: windows-latest
python:
- name: CPython 3.10
major_dot_minor: '3.10'
action: '3.10'
- name: CPython 3.11
major_dot_minor: '3.11'
action: '3.11'
- name: CPython 3.12
major_dot_minor: '3.12'
action: '3.12'
- name: PyPy 3.10
major_dot_minor: '3.10'
action: 'pypy-3.10'
steps:
- uses: actions/checkout@v3
with:
path: repo
- name: Download package files
uses: actions/download-artifact@v3
with:
name: packages
path: dist
- uses: actions/setup-python@v4
with:
# This allows the matrix to specify just the major.minor version while still
# expanding it to get the latest patch version including alpha releases.
# This avoids the need to update for each new alpha, beta, release candidate,
# and then finally an actual release version. actions/setup-python doesn't
# support this for PyPy presently so we get no help there.
#
# CPython -> 3.9.0-alpha - 3.9.X
# PyPy -> pypy-3.7
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python.action), matrix.python.action))[startsWith(matrix.python.action, 'pypy')] }}
architecture: x64
- name: Setup environment
run: |
python --version --version
# make sure we test the installed code
cp -R repo/tests/ tests/
python -m pip install --upgrade pip
python -m pip install -r tests/requirements.txt
python -m pip install ./dist/*.whl
# show the directory contents for diagnostics
ls -la
- name: Run pytest
run: |
python -m pytest tests/ --benchmark-disable
all:
name: All successful
runs-on: ubuntu-latest
# The always() part is very important.
# If not set, the job will be skipped on failing dependencies.
if: always()
needs:
# This is the list of CI job that we are interested to be green before
# a merge.
- build
- test
steps:
- name: Require all successes
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}