Skip to content

fix: avoid os.system #697

fix: avoid os.system

fix: avoid os.system #697

Workflow file for this run

---
name: Pytest and code Coverage
on:
push:
branches:
- "*"
pull_request:
branches:
- main
schedule:
# Run every night at 04:00 (GitHub Actions timezone)
# in order to catch when unfrozen dependency updates
# break the use of the library.
- cron: "4 0 * * *"
jobs:
pytest:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install required system packages for Ubuntu
run: sudo apt-get install -y python3-pip libsecp256k1-dev python3-coverage
if: startsWith(matrix.os, 'ubuntu-')
- name: Install required system packages for macOS
if: startsWith(matrix.os, 'macos-')
run: |
brew update
brew tap cuber/homebrew-libsecp256k1
brew install libsecp256k1
brew install automake
- name: Set up Python for macOS
if: startsWith(matrix.os, 'macos')
uses: actions/setup-python@v2
with:
python-version: 3.11
- run: python3 -m venv /tmp/venv
- run: /tmp/venv/bin/python -m pip install --upgrade pip hatch coverage
# Only run coverage on one OS
- run: /tmp/venv/bin/hatch run testing:test
if: matrix.os != 'ubuntu-24.04'
- name: Test with coverage
if: matrix.os == 'ubuntu-24.04'
run: |
/tmp/venv/bin/hatch run testing:cov
- uses: codecov/[email protected]
if: matrix.os == 'ubuntu-24.04'
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: aleph-im/aleph-client
file: ./coverage.xml
directory: /home/runner/work/aleph-client/aleph-client