forked from thomashoneyman/purescript-slug
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This replaces `shell.nix` with `flake.nix` so we can use `purescript-overlay` with the new `spago`. (I'm not sure all this is needed, just adapting from configuration I've seen for other projects, like thomashoneyman/purescript-halogen-realworld#124) I've run `npx spago-legacy migrate` and manually added the test dependencies to the new `spago.yaml` file.
- Loading branch information
1 parent
0142716
commit 1d621fc
Showing
8 changed files
with
4,697 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,39 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: main | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: thomashoneyman/setup-purescript@main | ||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@v4 | ||
|
||
- name: Setup Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
|
||
- name: Cache PureScript dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }} | ||
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yaml') }} | ||
path: | | ||
.spago | ||
output | ||
- run: spago build | ||
- name: Load Nix environment | ||
run: nix develop | ||
|
||
- name: Build source | ||
run: spago build | ||
|
||
- name: Run tests | ||
run: spago test | ||
|
||
- run: spago -x test/test.dhall test | ||
- name: Check formatting | ||
run: purs-tidy check src test |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
purescript-overlay.url = "github:thomashoneyman/purescript-overlay"; | ||
purescript-overlay.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
outputs = { | ||
self, | ||
nixpkgs, | ||
flake-utils, | ||
purescript-overlay, | ||
}: | ||
flake-utils.lib.eachDefaultSystem (system: let | ||
overlays = [purescript-overlay.overlays.default]; | ||
pkgs = import nixpkgs {inherit system overlays;}; | ||
in { | ||
devShells.default = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
purs | ||
purs-tidy | ||
purs-backend-es | ||
spago-unstable | ||
nodejs_20 | ||
]; | ||
}; | ||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.