-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bring DID/NFT effort into release/1.4.0
- Loading branch information
Showing
68 changed files
with
4,450 additions
and
688 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
117 changes: 117 additions & 0 deletions
117
.github/workflows/build-test-macos-wallet-nft_wallet.yml
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 |
---|---|---|
@@ -0,0 +1,117 @@ | ||
# | ||
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme | ||
# | ||
name: MacOS wallet-nft_wallet Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'long_lived/**' | ||
- main | ||
- 'release/**' | ||
tags: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
concurrency: | ||
# SHA is added to the end if on `main` to let all main workflows run | ||
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: MacOS wallet-nft_wallet Tests | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
matrix: | ||
python-version: ['3.9', '3.10'] | ||
os: [macOS-latest] | ||
env: | ||
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet | ||
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-nft_wallet | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python environment | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Create keychain for CI use | ||
run: | | ||
security create-keychain -p foo chiachain | ||
security default-keychain -s chiachain | ||
security unlock-keychain -p foo chiachain | ||
security set-keychain-settings -t 7200 -u chiachain | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Cache pip | ||
uses: actions/cache@v3 | ||
with: | ||
# Note that new runners may break this https://github.com/actions/cache/issues/292 | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Cache test blocks and plots | ||
uses: actions/cache@v2 | ||
id: test-blocks-plots | ||
with: | ||
path: | | ||
${{ github.workspace }}/.chia/blocks | ||
${{ github.workspace }}/.chia/test-plots | ||
key: 0.29.0 | ||
|
||
- name: Checkout test blocks and plots | ||
if: steps.test-blocks-plots.outputs.cache-hit != 'true' | ||
run: | | ||
wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - | ||
mkdir ${{ github.workspace }}/.chia | ||
mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia | ||
- name: Run install script | ||
env: | ||
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} | ||
run: | | ||
brew install boost | ||
sh install.sh -d | ||
# Omitted installing Timelord | ||
|
||
- name: Test wallet-nft_wallet code with pytest | ||
run: | | ||
. ./activate | ||
venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/wallet/nft_wallet/test_nft_clvm.py tests/wallet/nft_wallet/test_nft_wallet.py | ||
- name: Process coverage data | ||
run: | | ||
venv/bin/coverage combine --rcfile=.coveragerc .coverage.* | ||
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml | ||
mkdir coverage_reports | ||
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" | ||
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" | ||
venv/bin/coverage report --rcfile=.coveragerc --show-missing | ||
- name: Publish coverage | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage | ||
path: coverage_reports/* | ||
if-no-files-found: error | ||
# | ||
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme | ||
# |
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
119 changes: 119 additions & 0 deletions
119
.github/workflows/build-test-ubuntu-wallet-nft_wallet.yml
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 |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# | ||
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme | ||
# | ||
name: Ubuntu wallet-nft_wallet Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'long_lived/**' | ||
- main | ||
- 'release/**' | ||
tags: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
concurrency: | ||
# SHA is added to the end if on `main` to let all main workflows run | ||
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Ubuntu wallet-nft_wallet Test | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 4 | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
os: [ubuntu-latest] | ||
env: | ||
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet | ||
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_wallet-nft_wallet | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python environment | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache npm | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Cache pip | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Cache test blocks and plots | ||
uses: actions/cache@v2 | ||
id: test-blocks-plots | ||
with: | ||
path: | | ||
${{ github.workspace }}/.chia/blocks | ||
${{ github.workspace }}/.chia/test-plots | ||
key: 0.29.0 | ||
|
||
- name: Checkout test blocks and plots | ||
if: steps.test-blocks-plots.outputs.cache-hit != 'true' | ||
run: | | ||
wget -qO- https://github.com/Chia-Network/test-cache/archive/refs/tags/0.29.0.tar.gz | tar xzf - | ||
mkdir ${{ github.workspace }}/.chia | ||
mv ${{ github.workspace }}/test-cache-0.29.0/* ${{ github.workspace }}/.chia | ||
- name: Run install script | ||
env: | ||
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }} | ||
run: | | ||
sh install.sh -d | ||
# Omitted installing Timelord | ||
|
||
- name: Test wallet-nft_wallet code with pytest | ||
run: | | ||
. ./activate | ||
venv/bin/coverage run --rcfile=.coveragerc --module pytest --durations=10 -n 0 -m "not benchmark" tests/wallet/nft_wallet/test_nft_clvm.py tests/wallet/nft_wallet/test_nft_wallet.py | ||
- name: Process coverage data | ||
run: | | ||
venv/bin/coverage combine --rcfile=.coveragerc .coverage.* | ||
venv/bin/coverage xml --rcfile=.coveragerc -o coverage.xml | ||
mkdir coverage_reports | ||
cp .coverage "coverage_reports/.coverage.${{ env.JOB_FILE_NAME }}" | ||
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_FILE_NAME }}.xml" | ||
venv/bin/coverage report --rcfile=.coveragerc --show-missing | ||
- name: Publish coverage | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage | ||
path: coverage_reports/* | ||
if-no-files-found: error | ||
|
||
# Omitted resource usage check | ||
|
||
# | ||
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme | ||
# |
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
Oops, something went wrong.