-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c41d6fa
commit 7939d1a
Showing
5 changed files
with
16 additions
and
47 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: weekly |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,60 @@ | ||
--- | ||
name: Build source and wheel packages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
branches: [main] | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
branches: [main] | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-12, macos-13, macos-14, ubuntu-22.04, ubuntu-24.04] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Workaround github issue https://github.com/actions/runner-images/issues/7192 | ||
if: startsWith(matrix.os, 'ubuntu-') | ||
run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc | ||
|
||
- name: Set up Python | ||
if: startsWith(matrix.os, 'macos') | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-build-wheels-${{ hashFiles('pyproject.toml') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-wheels- | ||
- name: Install required system packages for macOS | ||
if: startsWith(matrix.os, 'macos-') | ||
run: | | ||
brew update | ||
brew tap cuber/homebrew-libsecp256k1 | ||
brew install libsecp256k1 | ||
- name: Install required system packages only for Ubuntu Linux | ||
if: startsWith(matrix.os, 'ubuntu-') | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y upgrade | ||
sudo apt-get install -y libsecp256k1-dev | ||
- name: Install Hatch | ||
run: | | ||
python3 -m venv /tmp/venv | ||
/tmp/venv/bin/python3 -m pip install --upgrade hatch | ||
- name: Build source and wheel packages | ||
run: | | ||
/tmp/venv/bin/python3 -m hatch build | ||
- name: Install the Python wheel | ||
run: | | ||
/tmp/venv/bin/python3 -m pip install dist/aleph_sdk_python-*.whl | ||
- name: Install `setuptools` on systems where it is missing by default | ||
run: /tmp/venv/bin/python3 -m pip install --upgrade setuptools | ||
if: matrix.os == 'ubuntu-24.04' | ||
|
||
- name: Import and use the package | ||
run: | | ||
run: |- | ||
/tmp/venv/bin/python3 -c "import aleph.sdk" | ||
/tmp/venv/bin/python3 -c "from aleph.sdk.chains.ethereum import get_fallback_account; get_fallback_account()" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,29 @@ | ||
--- | ||
name: Test code quality | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
branches: [main] | ||
jobs: | ||
code-quality: | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Workaround github issue https://github.com/actions/runner-images/issues/7192 | ||
run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get install -y python3-pip libsecp256k1-dev | ||
- name: Cache dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-code-quality-${{ hashFiles('pyproject.toml') }} | ||
restore-keys: | | ||
${{ runner.os }}-code-quality- | ||
- name: Install python dependencies | ||
run: | | ||
python3 -m venv /tmp/venv | ||
/tmp/venv/bin/pip install hatch | ||
- name: Run Hatch lint | ||
run: /tmp/venv/bin/hatch run linting:all |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,39 @@ | ||
--- | ||
name: Test/Coverage with Python | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
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 * * *' | ||
|
||
- cron: 4 0 * * * | ||
jobs: | ||
tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
python-version: ['3.9', '3.10', '3.11'] | ||
# An issue with secp256k1 prevents Python 3.12 from working | ||
# See https://github.com/baking-bad/pytezos/issues/370 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- run: sudo apt-get install -y python3-pip libsecp256k1-dev | ||
|
||
- run: | | ||
python3 -m venv /tmp/venv | ||
/tmp/venv/bin/python -m pip install --upgrade pip hatch coverage | ||
- run: | | ||
/tmp/venv/bin/pip freeze | ||
/tmp/venv/bin/hatch run testing:pip freeze | ||
/tmp/venv/bin/hatch run testing:test | ||
if: matrix.python-version != '3.11' | ||
- run: /tmp/venv/bin/hatch run testing:cov | ||
if: matrix.python-version == '3.11' | ||
|
||
- uses: codecov/[email protected] | ||
if: matrix.python-version == '3.11' | ||
with: | ||
|