mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 10:05:29 -05:00
* Bump actions/cache from 2.1.6 to 3 Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 3. - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v2.1.6...v3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update actions in templates also Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
108 lines
3.1 KiB
YAML
108 lines
3.1 KiB
YAML
#
|
|
# THIS FILE IS GENERATED. SEE https://github.com/Chia-Network/chia-blockchain/tree/main/tests#readme
|
|
#
|
|
name: MacOS core-full_node Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
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' && github.sha || '' }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
name: MacOS core-full_node Tests
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 50
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 4
|
|
matrix:
|
|
python-version: [3.8, 3.9]
|
|
os: [macOS-latest]
|
|
env:
|
|
CHIA_ROOT: ${{ github.workspace }}/.chia/mainnet
|
|
JOB_FILE_NAME: tests_${{ matrix.os }}_python-${{ matrix.python-version }}_core-full_node
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Python environment
|
|
uses: actions/setup-python@v2
|
|
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: Checkout test blocks and plots
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: 'Chia-Network/test-cache'
|
|
path: '.chia'
|
|
ref: '0.28.0'
|
|
fetch-depth: 1
|
|
|
|
- name: Run install script
|
|
env:
|
|
INSTALL_PYTHON_VERSION: ${{ matrix.python-version }}
|
|
run: |
|
|
brew install boost
|
|
sh install.sh -d
|
|
|
|
# Omitted installing Timelord
|
|
|
|
- name: Test core-full_node code with pytest
|
|
run: |
|
|
. ./activate
|
|
venv/bin/coverage run --rcfile=.coveragerc ./venv/bin/py.test tests/core/full_node/test_*.py -s -v --durations 0 -n 4 -m "not benchmark"
|
|
|
|
- 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@v2
|
|
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
|
|
#
|