mirror of
https://github.com/lightningd/plugins.git
synced 2026-08-13 12:33:19 +02:00
Some checks failed
Integration Tests (latest) / Test CLN=25.12.1, PY=3.10, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=25.12.1, PY=3.12, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=26.04.1, PY=3.10, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=26.04.1, PY=3.12, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=26.06.6, PY=3.10, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / Test CLN=26.06.6, PY=3.14, BCD=31.0, EXP=1, DEP=0 (push) Has been cancelled
Integration Tests (latest) / CI completion (push) Has been cancelled
Integration Tests (latest) / CI completion-1 (push) Has been cancelled
Integration Tests (latest) / CI completion-2 (push) Has been cancelled
```
Run sudo mkdir /usr/local/libexec
sudo mkdir /usr/local/libexec
sudo mkdir /usr/local/libexec/c-lightning
sudo mkdir /usr/local/libexec/c-lightning/plugins
sudo chown -R $USER /usr/local/libexec
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.12.13/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.13/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.13/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.13/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.13/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.13/x64/lib
UV_PYTHON_INSTALL_DIR: /home/runner/work/_temp/uv-python-dir
mkdir: cannot create directory ‘/usr/local/libexec’: File exists
Error: Process completed with exit code 1.
```
228 lines
8.6 KiB
YAML
228 lines
8.6 KiB
YAML
name: Integration Tests (latest)
|
|
|
|
# Cancel duplicate jobs
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
build-and-test:
|
|
name: Test CLN=${{ matrix.config.cln-version }}, PY=${{ matrix.config.python-version }}, BCD=${{ matrix.bitcoind-version }}, EXP=${{ matrix.experimental }}, DEP=${{ matrix.deprecated }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 90
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
bitcoind-version: ["31.0"]
|
|
experimental: [1]
|
|
deprecated: [0]
|
|
config:
|
|
- cln-version: "26.06.6"
|
|
python-version: "3.10"
|
|
- cln-version: "26.06.6"
|
|
python-version: "3.14"
|
|
- cln-version: "26.04.1"
|
|
python-version: "3.10"
|
|
- cln-version: "26.04.1"
|
|
python-version: "3.12"
|
|
- cln-version: "25.12.1"
|
|
python-version: "3.10"
|
|
- cln-version: "25.12.1"
|
|
python-version: "3.12"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Get changed files
|
|
id: get_changed_files
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
uses: tj-actions/changed-files@v47
|
|
with:
|
|
files: '**/*'
|
|
files_ignore: |
|
|
*.md
|
|
*.toml
|
|
*.yml
|
|
*.lock
|
|
Dockerfile
|
|
.gitignore
|
|
.gitmodules
|
|
.github/**
|
|
.ci/**
|
|
LICENSE
|
|
archived/**
|
|
|
|
- name: Set plugin_dirs
|
|
id: set_plugin_dirs
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
run: |
|
|
echo "all_changed_files: ${{ steps.get_changed_files.outputs.all_changed_files }}"
|
|
changed_files=$(echo "${{ steps.get_changed_files.outputs.all_changed_files }}" | tr ',' '\n')
|
|
plugin_dirs=""
|
|
for file in $changed_files; do
|
|
dir=$(dirname "$file" | cut -d'/' -f1)
|
|
if [[ "$dir" != "." && "${dir:0:1}" != "." && ! " ${plugin_dirs[@]} " =~ " ${dir} " ]]; then
|
|
plugin_dirs="${plugin_dirs} ${dir}"
|
|
fi
|
|
done
|
|
echo "plugin_dirs=${plugin_dirs}" >> "$GITHUB_OUTPUT"
|
|
|
|
if [[ -n "${{ steps.get_changed_files.outputs.all_changed_files }}" ]]; then
|
|
echo "run_ci=true" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "run_ci=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Set up Python ${{ matrix.config.python-version }}
|
|
if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }}
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.config.python-version }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v8.1.0
|
|
with:
|
|
enable-cache: false
|
|
|
|
- name: Extract exact python and os version
|
|
id: exact_versions
|
|
run: |
|
|
PYTHON_VERSION=$(python --version 2>&1 | grep -oP '(?<=Python )\d+\.\d+(\.\d+)?')
|
|
echo "Python version: $PYTHON_VERSION"
|
|
echo "python_version=$PYTHON_VERSION" >> "$GITHUB_OUTPUT"
|
|
OS_VERSION=$(lsb_release -rs)
|
|
echo "OS version: $OS_VERSION"
|
|
echo "os_version=$OS_VERSION" >> $GITHUB_OUTPUT
|
|
|
|
- name: Create cache paths
|
|
if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }}
|
|
run: |
|
|
sudo mkdir -p /usr/local/libexec/c-lightning/plugins
|
|
sudo chown -R $USER /usr/local/libexec
|
|
|
|
- name: Restore bitcoind cache
|
|
id: cache-bitcoind
|
|
if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }}
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: /usr/local/bin/bitcoin*
|
|
key: cache-bitcoind-${{ matrix.bitcoind-version }}-${{ steps.exact_versions.outputs.os_version }}
|
|
|
|
- name: Download Bitcoin ${{ matrix.bitcoind-version }} & install binaries
|
|
if: ${{ steps.cache-bitcoind.outputs.cache-hit != 'true' && (github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true') }}
|
|
run: |
|
|
export BITCOIND_VERSION=${{ matrix.bitcoind-version }}
|
|
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIND_VERSION}/bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz
|
|
tar -xzf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz
|
|
sudo mv bitcoin-${BITCOIND_VERSION}/bin/* /usr/local/bin
|
|
rm -rf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz bitcoin-${BITCOIND_VERSION}
|
|
|
|
- name: Save bitcoind cache
|
|
uses: actions/cache/save@v5
|
|
if: ${{ always() && (github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true') && steps.cache-bitcoind.outputs.cache-hit != 'true' }}
|
|
with:
|
|
path: /usr/local/bin/bitcoin*
|
|
key: cache-bitcoind-${{ matrix.bitcoind-version }}-${{ steps.exact_versions.outputs.os_version }}
|
|
|
|
- name: Restore CLN cache
|
|
id: cache-cln
|
|
if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }}
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
/usr/local/bin/lightning*
|
|
/usr/local/bin/reckless
|
|
/usr/local/libexec/c-lightning
|
|
key: cache-cln-${{ matrix.config.cln-version }}-${{ steps.exact_versions.outputs.os_version }}
|
|
|
|
- name: Download Core Lightning ${{ matrix.config.cln-version }} & install binaries
|
|
if: ${{ steps.cache-cln.outputs.cache-hit != 'true' && (github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true') }}
|
|
id: cln-install
|
|
run: |
|
|
url=$(curl -s https://api.github.com/repos/ElementsProject/lightning/releases/tags/v${{ matrix.config.cln-version }} \
|
|
| jq '.assets[] | select(.name | contains("24.04")) | .browser_download_url' \
|
|
| tr -d '\"')
|
|
wget $url
|
|
sudo tar -xvf ${url##*/} -C /usr/local --strip-components=2
|
|
|
|
- name: Save CLN cache
|
|
uses: actions/cache/save@v5
|
|
if: ${{ always() && (github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true') && steps.cache-cln.outputs.cache-hit != 'true' }}
|
|
with:
|
|
path: |
|
|
/usr/local/bin/lightning*
|
|
/usr/local/bin/reckless
|
|
/usr/local/libexec/c-lightning
|
|
key: cache-cln-${{ matrix.config.cln-version }}-${{ steps.exact_versions.outputs.os_version }}
|
|
|
|
- name: Run pytest tests
|
|
id: pytest_tests
|
|
if: ${{ github.event_name == 'push' || steps.set_plugin_dirs.outputs.run_ci == 'true' }}
|
|
run: |
|
|
export CLN_PATH=${{ github.workspace }}/lightning
|
|
export COMPAT=${{ matrix.deprecated }}
|
|
export EXPERIMENTAL_FEATURES=${{ matrix.experimental }}
|
|
export SLOW_MACHINE=1
|
|
export TEST_DEBUG=1
|
|
export TRAVIS=1
|
|
export VALGRIND=0
|
|
|
|
if [[ "${{ github.event_name }}" == 'pull_request' ]]; then
|
|
plugin_dirs="${{ steps.set_plugin_dirs.outputs.plugin_dirs }}"
|
|
else
|
|
plugin_dirs=""
|
|
fi
|
|
|
|
# Run the tests: In the case of a 'pull_request' event only the plugins in `plugin_dirs`
|
|
# are going to be tested; otherwise ('push' event) we test all plugins.
|
|
|
|
update_badges=''
|
|
if [[ "${{ github.event_name }}" == 'push' && "${{ github.ref }}" == 'refs/heads/master' ]] || [[ "${{ github.event_name }}" == 'schedule' ]]
|
|
then
|
|
update_badges='--update-badges'
|
|
fi
|
|
|
|
if [[ -z "$plugin_dirs" ]]; then
|
|
# Test all plugins if no specific plugins were changed
|
|
python3 .ci/test.py ${{ matrix.config.cln-version }} ${{ matrix.config.python-version }} $update_badges
|
|
else
|
|
python3 .ci/test.py ${{ matrix.config.cln-version }} ${{ matrix.config.python-version }} $update_badges $(echo "$plugin_dirs")
|
|
fi
|
|
|
|
gather:
|
|
# A dummy task that depends on the full matrix of tests, and signals completion.
|
|
name: CI completion
|
|
runs-on: ubuntu-latest
|
|
if: ${{ always() && github.event_name == 'push' }}
|
|
needs:
|
|
- build-and-test
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- cln-version: "26.06.6"
|
|
python-versions: "3.10 3.14"
|
|
- cln-version: "26.04.1"
|
|
python-versions: "3.10 3.12"
|
|
- cln-version: "25.12.1"
|
|
python-versions: "3.10 3.12"
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.14"
|
|
- name: Complete
|
|
run: |
|
|
echo "Updating badges data for ${{ matrix.cln-version }} workflow..."
|
|
python3 .ci/update_badges.py ${{ matrix.cln-version }} ${{ matrix.python-versions }}
|
|
echo "CI completed."
|