Retry on ChunkedEncodingError; Break loop on all errors #867
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: PyTest | |
on: | |
push: | |
branches: "**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
PYTHON_VERSION: "3.10" | |
COUNTERPARTY_RS_DIR: "./counterparty-rs" | |
jobs: | |
macos-x86_64: | |
runs-on: macos-12 #x86_64 | |
steps: | |
- uses: actions/checkout@v3 | |
# Install dependencies | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'pip' | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
default: true | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Install leveldb | |
run: | | |
brew install leveldb | |
- name: Install pytest and build module | |
run: | | |
pip install pytest hatch | |
python -m pip install --upgrade build | |
# Build counterparty packages | |
- name: Build counterparty-rs | |
uses: messense/maturin-action@v1 | |
with: | |
args: --release --out dist --sdist -m ${{ env.COUNTERPARTY_RS_DIR }}/Cargo.toml | |
- name: Build counterparty-core | |
run: | | |
cd counterparty-core && hatch build ../dist | |
# Install counterparty packages | |
- name: Install wheels | |
run: | | |
pip install dist/*.whl --force-reinstall | |
# Run counterparty-core tests | |
- name: Run counterparty-core tests | |
run: | | |
cd counterparty-core | |
pytest | |
# Upload wheels | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist | |
macos-m1: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v3 | |
# Install dependencies | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
default: true | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Install Python 3.10 and leveldb | |
run: | | |
brew install [email protected] leveldb | |
echo '/opt/homebrew/opt/[email protected]/libexec/bin' >> $GITHUB_PATH | |
- name: Install pytest and build module | |
run: | | |
pip3.10 install pytest hatch | |
python3.10 -m pip install --upgrade build | |
# Build counterparty packages | |
- name: Build counterparty-rs | |
uses: messense/maturin-action@v1 | |
with: | |
args: --release --out dist --sdist -m ${{ env.COUNTERPARTY_RS_DIR }}/Cargo.toml | |
- name: Build counterparty-core | |
run: | | |
cd counterparty-core && hatch build ../dist | |
# Install counterparty packages | |
- name: Install wheels | |
run: | | |
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib" | |
export CPATH="$CPATH:$(brew --prefix)/include" | |
pip3.10 install dist/*.whl --force-reinstall | |
# Run counterparty-core tests | |
- name: Run counterparty-core tests | |
run: | | |
cd counterparty-core | |
pytest | |
# Upload wheels | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist | |
ubuntu-22-04: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
# Install dependencies | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'pip' | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
default: true | |
- name: Install leveldb | |
run: | | |
sudo apt-get install -y libleveldb-dev | |
- name: Install pytest and build module | |
run: | | |
pip install pytest hatch | |
python -m pip install --upgrade build | |
# Build counterparty packages | |
- name: Build counterparty-rs | |
uses: messense/maturin-action@v1 | |
with: | |
args: --release --out dist --sdist -m ${{ env.COUNTERPARTY_RS_DIR }}/Cargo.toml | |
- name: Build counterparty-core | |
run: | | |
cd counterparty-core && hatch build ../dist | |
# Install counterparty packages | |
- name: Install wheels | |
run: | | |
pip install dist/*.whl --force-reinstall | |
# Run counterparty-core tests | |
- name: Run counterparty-core tests | |
run: | | |
cd counterparty-core | |
pytest | |
# Upload wheels | |
- name: Upload wheels | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: dist |