nutshell_itest.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. name: Nutshell integration
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches:
  7. - main
  8. - 'v[0-9]*.[0-9]*.x' # Match version branches like v0.13.x, v1.0.x, etc.
  9. release:
  10. types: [created]
  11. jobs:
  12. nutshell-integration-tests:
  13. name: Nutshell Mint Integration Tests
  14. runs-on: ubuntu-latest
  15. timeout-minutes: 30
  16. steps:
  17. - name: checkout
  18. uses: actions/checkout@v4
  19. - name: Get flake hash
  20. id: flake-hash
  21. run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT
  22. - name: Free Disk Space (Ubuntu)
  23. uses: jlumbroso/free-disk-space@main
  24. with:
  25. tool-cache: false
  26. android: true
  27. dotnet: true
  28. haskell: true
  29. large-packages: true
  30. docker-images: true
  31. swap-storage: true
  32. - name: Install Nix
  33. uses: DeterminateSystems/nix-installer-action@v17
  34. - name: Nix Cache
  35. uses: DeterminateSystems/magic-nix-cache-action@main
  36. with:
  37. diagnostic-endpoint: ""
  38. use-flakehub: false
  39. - name: Rust Cache
  40. uses: Swatinem/rust-cache@v2
  41. with:
  42. shared-key: "integration-${{ steps.flake-hash.outputs.hash }}"
  43. - name: Test Nutshell
  44. run: nix develop -i -L .#integration --command just test-nutshell
  45. - name: Show logs if tests fail
  46. if: failure()
  47. run: docker logs nutshell
  48. nutshell-wallet-integration-tests:
  49. name: Nutshell Wallet Integration Tests
  50. runs-on: ubuntu-latest
  51. timeout-minutes: 30
  52. steps:
  53. - name: checkout
  54. uses: actions/checkout@v4
  55. - name: Get flake hash
  56. id: flake-hash
  57. run: echo "hash=$(sha256sum flake.lock | cut -d' ' -f1 | cut -c1-8)" >> $GITHUB_OUTPUT
  58. - name: Free Disk Space (Ubuntu)
  59. uses: jlumbroso/free-disk-space@main
  60. with:
  61. tool-cache: false
  62. android: true
  63. dotnet: true
  64. haskell: true
  65. large-packages: true
  66. docker-images: true
  67. swap-storage: true
  68. - name: Pull Nutshell Docker image
  69. run: docker pull cashubtc/nutshell:latest
  70. - name: Install Nix
  71. uses: DeterminateSystems/nix-installer-action@v17
  72. - name: Nix Cache
  73. uses: DeterminateSystems/magic-nix-cache-action@main
  74. with:
  75. diagnostic-endpoint: ""
  76. use-flakehub: false
  77. - name: Rust Cache
  78. uses: Swatinem/rust-cache@v2
  79. with:
  80. shared-key: "integration-${{ steps.flake-hash.outputs.hash }}"
  81. - name: Test Nutshell Wallet
  82. run: |
  83. nix develop -i -L .#integration --command just nutshell-wallet-itest
  84. - name: Show Docker logs if tests fail
  85. if: failure()
  86. run: docker logs nutshell-wallet || true