ci: Fix cache key.

This commit is contained in:
tecnovert 2024-11-28 22:57:11 +02:00
parent d19a7538fd
commit 0dc55fc449
No known key found for this signature in database
GPG key ID: 8ED6D8750C4E3F93
2 changed files with 9 additions and 5 deletions

View file

@ -2,6 +2,10 @@ name: ci
on: [push, pull_request] on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env: env:
BIN_DIR: /tmp/cached_bin BIN_DIR: /tmp/cached_bin
TEST_RELOAD_PATH: /tmp/test_basicswap1 TEST_RELOAD_PATH: /tmp/test_basicswap1
@ -40,9 +44,10 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
env: env:
cache-name: cache-cores cache-name: cache-cores
CACHE_KEY: $(printf $(python bin/basicswap-prepare.py --version --withcoins=bitcoin) | sha256sum | head -c 64)
with: with:
path: "$BIN_DIR" path: "$BIN_DIR"
key: python bin/basicswap-prepare.py --version --withcoins=bitcoin,monero key: "$CACHE_KEY"
- if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }} - if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }}
name: Running basicswap-prepare name: Running basicswap-prepare
@ -55,4 +60,3 @@ jobs:
mkdir -p ${TEST_RELOAD_PATH}/bin mkdir -p ${TEST_RELOAD_PATH}/bin
cp -r $BIN_DIR/* ${TEST_RELOAD_PATH}/bin/ cp -r $BIN_DIR/* ${TEST_RELOAD_PATH}/bin/
pytest tests/basicswap/extended/test_encrypted_xmr_reload.py pytest tests/basicswap/extended/test_encrypted_xmr_reload.py

View file

@ -1515,17 +1515,17 @@ def modify_tor_config(
def printVersion(with_coins): def printVersion(with_coins):
logger.info(f"Basicswap version: {__version__}") print(f"Basicswap version: {__version__}")
if len(with_coins) < 1: if len(with_coins) < 1:
return return
logger.info("Core versions:") print("Core versions:")
with_coins_changed: bool = False if len(with_coins) == 1 and "particl" in with_coins else True with_coins_changed: bool = False if len(with_coins) == 1 and "particl" in with_coins else True
for coin, version in known_coins.items(): for coin, version in known_coins.items():
if with_coins_changed and coin not in with_coins: if with_coins_changed and coin not in with_coins:
continue continue
postfix = " (Disabled)" if coin in disabled_coins else "" postfix = " (Disabled)" if coin in disabled_coins else ""
logger.info("\t%s: %s%s%s", coin.capitalize(), version[0], version[1], postfix) print("\t{}: {}{}{}".format(coin.capitalize(), version[0], version[1], postfix))
def printHelp(): def printHelp():