-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #358 from input-output-hk/release/1.1.0
Release/1.1.0
- Loading branch information
Showing
1,997 changed files
with
420 additions
and
344 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ develop, master ] | ||
pull_request: | ||
branches: [ develop, master ] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x] | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Lint and test | ||
env: | ||
CI: true | ||
run: | | ||
yarn --offline --frozen-lockfile --non-interactive | ||
yarn lint | ||
yarn static:build | ||
yarn test | ||
yarn static:serve -l 4000 & | ||
yarn test:e2e | ||
This file was deleted.
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,2 @@ | ||
yarn-offline-mirror "./packages-cache" | ||
yarn-offline-mirror-pruning true |
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
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
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,4 +1 @@ | ||
{ | ||
}: | ||
|
||
let pkgs = import ./nix/pkgs.nix { }; in pkgs.packages | ||
(import ./nix/pkgs.nix {}).packages |
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
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,70 @@ | ||
{ stdenv | ||
, nix-inclusive | ||
, nodejs | ||
, nodePackages | ||
, runtimeShell | ||
, sources | ||
, yarn | ||
}: | ||
|
||
let | ||
packageJSON = builtins.fromJSON (builtins.readFile ../package.json); | ||
|
||
src = stdenv.mkDerivation { | ||
pname = "${packageJSON.name}-src"; | ||
version = packageJSON.version; | ||
buildInputs = [ yarn nodejs ]; | ||
src = nix-inclusive ./.. [ | ||
../yarn.lock | ||
../.yarnrc | ||
../package.json | ||
../packages-cache | ||
../tsconfig.json | ||
../source | ||
../cypress | ||
../.storybook | ||
../codegen.yml | ||
../.babelrc | ||
../stories | ||
../cypress.json | ||
../jest.config.js | ||
../next.config.js | ||
../postcss.config.js | ||
../tslint.json | ||
../wallaby.conf.js | ||
]; | ||
buildCommand = '' | ||
export HOME=$NIX_BUILD_TOP | ||
mkdir -p $out | ||
cp -r $src/. $out/ | ||
chmod -R u+w $out | ||
cd $out | ||
export CYPRESS_INSTALL_BINARY=0 | ||
yarn --offline --frozen-lockfile --non-interactive | ||
''; | ||
}; | ||
|
||
in stdenv.mkDerivation { | ||
pname = packageJSON.name; | ||
version = packageJSON.version; | ||
inherit src; | ||
buildInputs = [ nodejs yarn ]; | ||
buildCommand = '' | ||
mkdir -p $out | ||
cp -r $src/. $out/ | ||
chmod -R u+w $out | ||
patchShebangs $out | ||
cd $out | ||
yarn build | ||
find . -name node_modules -type d -print0 | xargs -0 rm -rf | ||
yarn --production --offline --frozen-lockfile --non-interactive | ||
mkdir -p $out/bin | ||
cat <<EOF > $out/bin/${packageJSON.name} | ||
#!${runtimeShell} | ||
exec ${nodejs}/bin/node $out/packages/server/dist/index.js | ||
EOF | ||
chmod +x $out/bin/${packageJSON.name} | ||
''; | ||
} // { inherit src; } |
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,44 +1,21 @@ | ||
{ lib, pkgs }: | ||
|
||
let | ||
src = lib.cleanSourceWith { | ||
filter = lib.cleanSourceFilter; | ||
src = lib.cleanSourceWith { | ||
filter = name: type: let | ||
baseName = baseNameOf (toString name); | ||
sansPrefix = lib.removePrefix (toString ../.) name; | ||
in_blacklist = | ||
lib.hasPrefix "/node_modules" sansPrefix || | ||
lib.hasPrefix "/build" sansPrefix; | ||
in_whitelist = | ||
(type == "directory") || | ||
(lib.hasSuffix ".yml" name) || | ||
#(lib.hasSuffix ".js" name) || | ||
(lib.hasSuffix ".ts" name) || | ||
#(lib.hasSuffix ".tsx" name) || | ||
(lib.hasSuffix ".json" name) || | ||
#(lib.hasSuffix ".graphql" name) || | ||
#(lib.hasPrefix "/source/public/assets" sansPrefix) || | ||
(lib.hasPrefix "/source" sansPrefix) || | ||
baseName == ".babelrc" || | ||
baseName == "package.json" || | ||
baseName == "next.config.js" || | ||
baseName == "yarn.lock" || | ||
(lib.hasPrefix "/deploy" sansPrefix); | ||
in ( | ||
(!in_blacklist) && in_whitelist | ||
); | ||
src = ../.; | ||
}; | ||
}; | ||
nodePackages = pkgs.callPackage ./node-packages {}; | ||
packages = self: { | ||
inherit src; | ||
whitelist = pkgs.runCommand "whitelist.json" { buildInputs = [ nodePackages.persistgraphql ]; } '' | ||
persistgraphql ${src} $out | ||
sources = import ./sources.nix; | ||
allowList = pkgs.runCommand "allowList.json" { buildInputs = [ nodePackages.persistgraphql ]; } '' | ||
persistgraphql ${self.cardano-explorer-app.src} $out | ||
''; | ||
static = self.callPackage ./static.nix {}; | ||
yarn-static = self.callPackage ./yarn2nix.nix {}; | ||
nodejs = pkgs.nodejs-12_x; | ||
nix-inclusive = pkgs.callPackage "${self.sources.nix-inclusive}/inclusive.nix" {}; | ||
static = self.callPackage ./static.nix { | ||
src = self.cardano-explorer-app; | ||
}; | ||
yarn-static = self.callPackage ./yarn2nix.nix { | ||
inherit (pkgs.yarn2nix-moretea) importOfflineCache mkYarnNix; | ||
}; | ||
inherit (self.yarn-static.passthru) offlinecache; | ||
cardano-explorer-app = self.callPackage ./cardano-explorer-app.nix {}; | ||
}; | ||
in pkgs.lib.makeScope pkgs.newScope packages |
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,16 +1,9 @@ | ||
{ sources ? import ./sources.nix | ||
}: | ||
{ sources ? import ./sources.nix }: | ||
|
||
let | ||
# TODO: filter src to just the files needed to build | ||
src = ../.; | ||
iohkNix = import sources.iohk-nix {}; | ||
overlay = self: super: { | ||
inherit (import sources.niv {}) niv; | ||
packages = self.callPackage ./packages.nix { }; | ||
node = super.nodejs-12_x; | ||
inherit (import sources.yarn2nix { pkgs = self; }) yarn2nix mkYarnModules mkYarnPackage importOfflineCache mkYarnNix fixup_yarn_lock; | ||
packages = self.callPackages ./packages.nix { }; | ||
}; | ||
in | ||
import sources.nixpkgs { | ||
overlays = [ overlay ]; | ||
config = {}; | ||
} | ||
import iohkNix.nixpkgs { overlays = [ overlay ]; config = {}; } |
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
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
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
Oops, something went wrong.