Skip to content

Commit

Permalink
Merge pull request #128 from hhefesto/flake-parts
Browse files Browse the repository at this point in the history
Flake parts
  • Loading branch information
sfultong authored Jan 13, 2025
2 parents 82c4241 + 9ef11dd commit 3ae6189
Show file tree
Hide file tree
Showing 11 changed files with 265 additions and 272 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/telomare-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,36 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
- uses: cachix/cachix-action@v14
with:
name: telomare
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
extraPullNames: nix-community
- name: Build and test
run: |
echo cachix use
cachix use iohk
# echo cachix use
# cachix use iohk
echo nix build and tests:
nix -Lv flake check
echo testing telomare-repl and nix develop:
[[ "8" -eq $(nix -Lv develop -c cabal run telomare-repl -- --expr 'succ 7' | tail -n 1) ]]
echo "Setting up cabal..."
nix -Lv develop -c cabal update
echo "Testing telomare-repl..."
REPL_OUTPUT=$(nix -Lv develop -c cabal run telomare-repl -- --expr 'succ 7' 2>/dev/null | tail -n 1)
echo "REPL output: $REPL_OUTPUT"
if [[ "$REPL_OUTPUT" == "8" ]]; then
echo "REPL test passed"
else
echo "REPL test failed: expected 8, got '$REPL_OUTPUT'"
exit 1
fi
echo building for legacy nix-shell:
nix-build
nix-shell --run "echo OK"
Expand Down
209 changes: 25 additions & 184 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3ae6189

Please sign in to comment.