Skip to content

Commit

Permalink
Merge pull request #6 from hackworthltd/dhess/buildkite
Browse files Browse the repository at this point in the history
Build this project with Nix & Buildkite
  • Loading branch information
dhess authored Nov 28, 2022
2 parents ead4531 + 1c5d2ee commit 69917ad
Show file tree
Hide file tree
Showing 29 changed files with 4,861 additions and 1,086 deletions.
24 changes: 24 additions & 0 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
agents:
public: "true"
os: "linux"

steps:
- command: nix-buildkite
label: ":nixos: :buildkite:"
plugins:
- circuithub/nix-buildkite:
file: ci.nix

- label: ":nixos: Archive Nix flake inputs"
command: nix flake archive .#

- wait

- label: ":nixos: :linux: Cache the Nix shell"
command: |
nix develop --print-build-logs --profile /tmp/tidy --command echo "done"
- label: ":nixos: :macos: Cache the Nix shell"
command: |
nix develop --print-build-logs --profile /tmp/tidy --command echo "done"
agents:
os: "darwin"
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.eslintrc.cjs
module/
node_modules/
coverage/
target/
dist/
wasm_dist/
docs/
storybook-static/
.cache/
*.log
.DS_Store
41 changes: 41 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',

extends: [
'eslint:recommended',
'plugin:eslint-comments/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:@typescript-eslint/recommended',
'plugin:storybook/recommended',
'prettier',
],

settings: {
react: {
// Stop eslint-plugin-react from complaining.
version: '17',
},

// This keeps the eslint-plugin-import linter in sync with our
// TypeScript settings, so we only need to set up path aliases in
// tsconfig.json.
'import/resolver': {
typescript: {
project: ['tsconfig.json'],
},
},
},

rules: {
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
},
],
}
};
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
lib/
module/
node_modules/
coverage/
Expand All @@ -10,3 +9,6 @@ storybook-static/
.cache/
*.log
.DS_Store

# Nix
result*
17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
README.md
CHANGELOG.md
LICENSE
module/
node_modules/
coverage/
target/
dist/
wasm_dist/
docs/
storybook-static/
.cache/
*.log
.DS_Store
.github/
result*
.buildkite/
15 changes: 15 additions & 0 deletions .storybook/main.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: '@storybook/react',
core: {
builder: '@storybook/builder-vite',
},
features: {
storyStoreV7: true,
},
};
18 changes: 0 additions & 18 deletions .storybook/main.js

This file was deleted.

2 changes: 1 addition & 1 deletion .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<script>
window.global = window;
</script>
</script>
1 change: 1 addition & 0 deletions ci.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(import ./flake-compat.nix).defaultNix.ciJobs
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(import ./flake-compat.nix).defaultNix
9 changes: 9 additions & 0 deletions flake-compat.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
inherit (lock.nodes.flake-compat.locked) owner repo rev narHash;
flake-compat = builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
sha256 = narHash;
};
in
import flake-compat { src = ./.; }
157 changes: 157 additions & 0 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 69917ad

Please sign in to comment.