Fix macOS compatibility when scala-cli is used #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| - name: Check flake | |
| run: nix flake check | |
| - name: Build generate-lockfile | |
| run: nix build .#generate-lockfile | |
| - name: Generate lockfile for test project | |
| working-directory: test | |
| run: | | |
| nix develop ..#default --command python ../scripts/generate-lockfile.py lockfile-config.json > deps.lock.json | |
| echo "Generated lockfile with $(grep -c '"url":' deps.lock.json) artifacts" | |
| - name: Build test project | |
| working-directory: test | |
| run: nix build -L --override-input sbt-nix path:.. | |
| - name: Run test project | |
| working-directory: test | |
| run: | | |
| if [ -f result/bin/sbt-nix-test ]; then | |
| ./result/bin/sbt-nix-test | |
| elif [ -f result/lib/sbt-nix-test.jar ]; then | |
| nix run nixpkgs#jdk21 -- -jar result/lib/sbt-nix-test.jar | |
| else | |
| echo "Build output:" | |
| ls -la result/ | |
| ls -la result/lib/ || true | |
| fi |