mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-13 01:46:26 +01:00
90 lines
2.7 KiB
YAML
90 lines
2.7 KiB
YAML
name: Nutshell integration
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- 'v[0-9]*.[0-9]*.x' # Match version branches like v0.13.x, v1.0.x, etc.
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
nutshell-integration-tests:
|
|
name: Nutshell Mint Integration Tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
- name: Get flake hash
|
|
id: flake-hash
|
|
run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT
|
|
- name: Free Disk Space (Ubuntu)
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: false
|
|
android: true
|
|
dotnet: true
|
|
haskell: true
|
|
large-packages: true
|
|
docker-images: true
|
|
swap-storage: true
|
|
- name: Install Nix
|
|
uses: DeterminateSystems/nix-installer-action@v17
|
|
- name: Nix Cache
|
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
|
with:
|
|
diagnostic-endpoint: ""
|
|
use-flakehub: false
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "integration-${{ steps.flake-hash.outputs.hash }}"
|
|
- name: Test Nutshell
|
|
run: nix develop -i -L .#integration --command just test-nutshell
|
|
- name: Show logs if tests fail
|
|
if: failure()
|
|
run: docker logs nutshell
|
|
|
|
nutshell-wallet-integration-tests:
|
|
name: Nutshell Wallet Integration Tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
- name: Get flake hash
|
|
id: flake-hash
|
|
run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT
|
|
- name: Free Disk Space (Ubuntu)
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: false
|
|
android: true
|
|
dotnet: true
|
|
haskell: true
|
|
large-packages: true
|
|
docker-images: true
|
|
swap-storage: true
|
|
- name: Pull Nutshell Docker image
|
|
run: docker pull cashubtc/nutshell:latest
|
|
- name: Install Nix
|
|
uses: DeterminateSystems/nix-installer-action@v17
|
|
- name: Nix Cache
|
|
uses: DeterminateSystems/magic-nix-cache-action@main
|
|
with:
|
|
diagnostic-endpoint: ""
|
|
use-flakehub: false
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
shared-key: "integration-${{ steps.flake-hash.outputs.hash }}"
|
|
- name: Test Nutshell Wallet
|
|
run: |
|
|
nix develop -i -L .#integration --command just nutshell-wallet-itest
|
|
- name: Show Docker logs if tests fail
|
|
if: failure()
|
|
run: docker logs nutshell-wallet || true
|