Skip to content

Commit edd4221

Browse files
committed
feat: checks github action
1 parent a038169 commit edd4221

File tree

5 files changed

+187
-3
lines changed

5 files changed

+187
-3
lines changed

.github/workflows/checks.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: 'Checks'
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
push:
7+
branches: ['main']
8+
9+
defaults:
10+
run:
11+
shell: devenv shell bash -- -e {0}
12+
13+
env:
14+
ACTIONS_RUNNER_DEBUG: true
15+
16+
jobs:
17+
checks:
18+
# purposely disabled for now
19+
if: false
20+
runs-on: ['ubuntu-latest']
21+
steps:
22+
- name: 'Checkout Code'
23+
uses: actions/checkout@v4
24+
25+
- name: 'Install Nix'
26+
uses: cachix/install-nix-action@master
27+
28+
- name: 'Setup Cachix'
29+
uses: cachix/cachix-action@master
30+
with:
31+
name: devenv
32+
33+
- name: 'Install devenv.sh'
34+
run: nix profile install nixpkgs#devenv
35+
36+
- name: 'Format'
37+
run: |
38+
taplo fmt *.toml
39+
nixfmt *.nix --width=100
40+
biome format . --write
41+
cargo fmt --all -- --config-path=rustfmt.toml
42+
43+
- name: 'Lint'
44+
run: |
45+
taplo lint *.toml
46+
biome lint . --write
47+
cargo clippy --all-targets --all-features -- -A clippy::pedantic
48+
deadnix --no-lambda-pattern-names && statix check .
49+
50+
- name: 'Build'
51+
run: |
52+
nix build
53+
cargo build --all-targets --all-features
54+
cargo test --all-targets --all-features

.vscode/keybindings.json

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
[
2+
{
3+
"key": "cmd+;",
4+
"command": "editor.action.goToDeclaration"
5+
},
6+
{
7+
"key": "cmd+alt+i",
8+
"command": "workbench.action.terminal.toggleTerminal"
9+
},
10+
{
11+
"key": "shift+cmd+;",
12+
"command": "workbench.action.navigateBack",
13+
"when": "canNavigateBack"
14+
},
15+
{
16+
"key": "alt+left",
17+
"command": "workbench.action.terminal.sendSequence",
18+
"args": {
19+
"text": "\u001b[1;5D" // cursor one word left
20+
},
21+
"when": "terminalFocus"
22+
},
23+
{
24+
"key": "alt+right",
25+
"command": "workbench.action.terminal.sendSequence",
26+
"args": {
27+
"text": "\u001b[1;5C" // cursor one word right
28+
},
29+
"when": "terminalFocus"
30+
},
31+
{
32+
"key": "alt+up",
33+
"command": "workbench.action.terminal.scrollToTop",
34+
"when": "terminalFocus"
35+
},
36+
{
37+
"key": "alt+down",
38+
"command": "workbench.action.terminal.scrollToBottom",
39+
"when": "terminalFocus"
40+
},
41+
{
42+
"key": "alt+right",
43+
"command": "editor.action.inlineSuggest.showNext",
44+
"when": "textInputFocus && inlineSuggestionVisible"
45+
},
46+
{
47+
"key": "alt+left",
48+
"command": "editor.action.inlineSuggest.showPrevious",
49+
"when": "inlineSuggestionVisible && textInputFocus"
50+
},
51+
{
52+
"key": "alt+down",
53+
"command": "editor.action.triggerSuggest",
54+
"when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly && !suggestWidgetVisible && inlineSuggestionVisible"
55+
},
56+
// cmd+k clear terminal
57+
{
58+
"key": "cmd+k",
59+
"command": "workbench.action.terminal.clear"
60+
},
61+
// cmd+shift+enter open terminal
62+
{
63+
"key": "cmd+shift+enter",
64+
"command": "workbench.action.terminal.toggleTerminal"
65+
},
66+
{
67+
"key": "cmd+shift+backspace",
68+
"command": "workbench.action.terminal.kill"
69+
},
70+
{
71+
"key": "ctrl+]",
72+
"command": "ctrl+]",
73+
"when": "editor.action.inlineSuggest.showNext"
74+
},
75+
{
76+
"key": "shift+cmd+r",
77+
"command": "-extension.vsKubernetesDescribe.Refresh",
78+
"when": "vscodeKubernetesDescribeContext"
79+
},
80+
{
81+
"key": "ctrl+c",
82+
"command": "copilot-labs.use-brush-picker",
83+
"when": "editorTextFocus"
84+
},
85+
{
86+
"key": "ctrl+b",
87+
"command": "-copilot-labs.use-brush-picker",
88+
"when": "editorTextFocus"
89+
},
90+
{
91+
"key": "alt+up",
92+
"command": "-workbench.action.terminal.accessibleBufferGoToPreviousCommand",
93+
"when": "accessibilityModeEnabled && terminalAccessibleBufferFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalAccessibleBufferFocus && terminalProcessSupported"
94+
},
95+
{
96+
"key": "alt+down",
97+
"command": "-workbench.action.terminal.accessibleBufferGoToNextCommand",
98+
"when": "accessibilityModeEnabled && terminalAccessibleBufferFocus || accessibilityModeEnabled && terminalAccessibleBufferFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalAccessibleBufferFocus && terminalProcessSupported"
99+
},
100+
{
101+
"key": "cmd+r",
102+
"command": "-python.refreshTensorBoard",
103+
"when": "python.hasActiveTensorBoardSession"
104+
},
105+
{
106+
"key": "cmd+r",
107+
"command": "-workbench.action.terminal.runRecentCommand",
108+
"when": "accessibilityModeEnabled && terminalFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalFocus && terminalProcessSupported || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
109+
},
110+
{
111+
"key": "cmd+r",
112+
"command": "-workbench.action.reloadWindow",
113+
"when": "isDevelopment"
114+
},
115+
{
116+
"key": "cmd+r",
117+
"command": "renameFile",
118+
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
119+
},
120+
{
121+
"key": "enter",
122+
"command": "-renameFile",
123+
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
124+
}
125+
]

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ members = [
99

1010
[workspace.package]
1111
version = "0.1.0"
12-
edition = "2021"
12+
edition = "2024"
1313
repository = "https://github.com/unionlabs/tools"
1414

1515
[workspace.lints.rust]

flake.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
{
2727
packages = forEachSystem (system: {
2828
devenv-up = self.devShells.${system}.default.config.procfileScript;
29+
packages.${system}.devenv-test = self.devShells.${system}.default.config.test;
30+
2931
});
3032
devShells = forEachSystem (
3133
system:
@@ -49,6 +51,7 @@
4951
channel = "nightly";
5052
targets = [ ];
5153
components = [
54+
"miri"
5255
"rustc"
5356
"cargo"
5457
"clippy"

launcher/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
cargo-features = ["edition2024"]
2+
13
[package]
2-
edition.workspace = true
3-
repository.workspace = true
44
name = "launcher"
55
version = "0.1.0"
66
description = "Launches vscode server in the browser"
7+
edition.workspace = true
8+
repository.workspace = true
79

810
[dependencies]
911

0 commit comments

Comments
 (0)