Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,43 @@ jobs:
- name: 'Tear down Docker'
if: always()
run: docker stop --time=0 ${CONTAINER}

nix:
needs: code-quality-checks
name: 'Nix Tests'
strategy:
fail-fast: false
matrix:
runner: [normal, MacM1] # MacM1 / normal are self-hosted,
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Install Nix'
if: ${{ matrix.runner != 'MacM1' }}
uses: cachix/[email protected]
with:
install_url: https://releases.nixos.org/nix/nix-2.24.12/install
extra_nix_config: |
substituters = http://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org
- name: 'Install Cachix'
if: ${{ matrix.runner != 'MacM1' }}
uses: cachix/cachix-action@v16
with:
name: k-framework
- name: 'Build Komet'
env:
NIX_PATH: 'nixpkgs=http://nixos.org/channels/nixos-22.05/nixexprs.tar.xz'
GC_DONT_GC: '1'
run: |
set -euxo pipefail
nix --version
JQ=$(nix-build '<nixpkgs>' -A jq --no-link)/bin/jq
KOMET_BIN=$(nix build .#komet.rust-stellar --print-build-logs --json | $JQ -r '.[].outputs | to_entries[].value')/bin
echo $KOMET_BIN >> $GITHUB_PATH
- name: 'Run smoke test'
run: cd package && ./test-package.sh
9 changes: 9 additions & 0 deletions package/test-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -euxo pipefail

which komet
komet --help

cd test-project
komet prove run --id 'test_true'
2 changes: 2 additions & 0 deletions package/test-project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target
test_snapshots
Loading