Skip to content

Commit

Permalink
Setup github actions to run integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed May 26, 2024
1 parent 2e39b58 commit 9ada2a8
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "CI"

on:
push:
branches:
- master
pull_request:

jobs:
build-test:
name: "Build & test"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4

- name: ❄ Prepare nix
uses: cachix/install-nix-action@v26
with:
extra_nix_config: |
accept-flake-config = true
log-lines = 1000
- name: Prepare
run: |
nix develop --command bash -c "cabal update"
- name: Build
run: |
nix develop --command bash -c "cabal build"
- name: Test
# NOTE: The onlyCabal shell does not contain cardano-node
run: |
nix develop .#onlyCabal --command bash -c "cabal test"
7 changes: 7 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@
inputs.cardano-node.packages.${system}.cardano-node
];
};

# Only cabal and no cardano-node to run integration tests
devShells.onlyCabal = pkgs.mkShell {
packages = [
pkgs.cabal-install
];
};
});

nixConfig = {
Expand Down

0 comments on commit 9ada2a8

Please sign in to comment.