mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-26 17:14:59 +01:00
feat: add nix cache to ci (#949)
* feat: add nix cache to ci * feat: shared caches
This commit is contained in:
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
@@ -21,8 +21,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "nightly"
|
||||
- name: Cargo fmt
|
||||
run: |
|
||||
nix develop -i -L .#nightly --command bash -c '
|
||||
@@ -53,8 +57,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Run example
|
||||
run: nix develop -i -L .#stable --command cargo r --example ${{ matrix.build-args }}
|
||||
|
||||
@@ -135,8 +143,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Clippy
|
||||
run: nix develop -i -L .#stable --command cargo clippy ${{ matrix.build-args }} -- -D warnings
|
||||
- name: Test
|
||||
@@ -162,8 +174,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Test
|
||||
run: nix develop -i -L .#stable --command just itest ${{ matrix.database }}
|
||||
|
||||
@@ -187,8 +203,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Clippy
|
||||
run: nix develop -i -L .#stable --command cargo clippy -- -D warnings
|
||||
- name: Test fake auth mint
|
||||
@@ -212,8 +232,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Test fake mint
|
||||
run: nix develop -i -L .#stable --command just test-pure ${{ matrix.database }}
|
||||
- name: Test mint
|
||||
@@ -238,8 +262,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Test
|
||||
run: nix develop -i -L .#stable --command just itest-payment-processor ${{matrix.ln}}
|
||||
|
||||
@@ -274,8 +302,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "msrv"
|
||||
- name: Build
|
||||
run: nix develop -i -L .#msrv --command cargo build ${{ matrix.build-args }}
|
||||
|
||||
@@ -302,8 +334,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Build cdk and binding
|
||||
run: nix develop -i -L ".#${{ matrix.rust }}" --command cargo build ${{ matrix.build-args }} --target ${{ matrix.target }}
|
||||
|
||||
@@ -330,8 +366,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "msrv"
|
||||
- name: Build cdk wasm
|
||||
run: nix develop -i -L ".#${{ matrix.rust }}" --command cargo build ${{ matrix.build-args }} --target ${{ matrix.target }}
|
||||
|
||||
@@ -351,8 +391,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Start Keycloak with Backup
|
||||
run: |
|
||||
docker compose -f misc/keycloak/docker-compose-recover.yml up -d
|
||||
@@ -377,8 +421,12 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Run doc tests
|
||||
run: nix develop -i -L .#stable --command cargo test --doc
|
||||
|
||||
@@ -392,7 +440,11 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "stable"
|
||||
- name: Check docs with strict warnings
|
||||
run: nix develop -i -L .#stable --command just docs-strict
|
||||
|
||||
6
.github/workflows/nutshell_itest.yml
vendored
6
.github/workflows/nutshell_itest.yml
vendored
@@ -12,6 +12,8 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v17
|
||||
- name: Nix Cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: Test Nutshell
|
||||
@@ -31,6 +33,8 @@ jobs:
|
||||
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
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: Test Nutshell Wallet
|
||||
@@ -38,4 +42,4 @@ jobs:
|
||||
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
|
||||
run: docker logs nutshell-wallet || true
|
||||
|
||||
Reference in New Issue
Block a user