nutshell_itest.yml 2.6 KB

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