Files
lspd/.github/actions/process-test-state/action.yaml
lndev 36f7b87b29 Add GitHub Actions for Bitcoin, c-lightning, and LND setup and integration tests
- A new GitHub Actions workflow for running integration tests has been added. This workflow is defined in .github/workflows/integration_tests.yaml.
- New GitHub Actions for setting up Bitcoin, c-lightning, and LND environments have been implemented.
- The actions use caching for quick builds.
- The .gitignore file has been updated.
- LND and CLN setup and tests now run in their own individual jobs, which should improve the workflow speed.
- Introduced a new reusable action for handling test states.
2023-07-28 15:55:18 +02:00

37 lines
1.0 KiB
YAML

name: "Process Test State"
description: "Check, tar and upload test state"
inputs:
artifact-name:
description: "Name of the artifact"
required: true
default: "test_state_artifact"
test-state-path:
description: "Path of the test state directory"
required: true
default: "/home/runner/test_state"
runs:
using: "composite"
steps:
- name: Check if test_state directory exists
id: check-test-state
run: |
if [ -d "${{ inputs.test-state-path }}" ]; then
echo "exists=true" >> $GITHUB_ENV
else
echo "exists=false" >> $GITHUB_ENV
fi
shell: bash
- name: Tar state
run: |
find ${{ inputs.test-state-path }} -type f -o -type d | tar -czf ${{ inputs.test-state-path }}.tar.gz -T -
shell: bash
if: env.exists == 'true'
- name: Upload test_state as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.test-state-path }}.tar.gz
if: env.exists == 'true'