Skip to content

Commit

Permalink
feat: checks github action
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az committed Nov 24, 2024
1 parent a038169 commit edd4221
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 3 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 'Checks'

on:
pull_request:
workflow_dispatch:
push:
branches: ['main']

defaults:
run:
shell: devenv shell bash -- -e {0}

env:
ACTIONS_RUNNER_DEBUG: true

jobs:
checks:
# purposely disabled for now
if: false
runs-on: ['ubuntu-latest']
steps:
- name: 'Checkout Code'
uses: actions/checkout@v4

- name: 'Install Nix'
uses: cachix/install-nix-action@master

- name: 'Setup Cachix'
uses: cachix/cachix-action@master
with:
name: devenv

- name: 'Install devenv.sh'
run: nix profile install nixpkgs#devenv

- name: 'Format'
run: |
taplo fmt *.toml
nixfmt *.nix --width=100
biome format . --write
cargo fmt --all -- --config-path=rustfmt.toml
- name: 'Lint'
run: |
taplo lint *.toml
biome lint . --write
cargo clippy --all-targets --all-features -- -A clippy::pedantic
deadnix --no-lambda-pattern-names && statix check .
- name: 'Build'
run: |
nix build
cargo build --all-targets --all-features
cargo test --all-targets --all-features
125 changes: 125 additions & 0 deletions .vscode/keybindings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
[
{
"key": "cmd+;",
"command": "editor.action.goToDeclaration"
},
{
"key": "cmd+alt+i",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "shift+cmd+;",
"command": "workbench.action.navigateBack",
"when": "canNavigateBack"
},
{
"key": "alt+left",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u001b[1;5D" // cursor one word left
},
"when": "terminalFocus"
},
{
"key": "alt+right",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u001b[1;5C" // cursor one word right
},
"when": "terminalFocus"
},
{
"key": "alt+up",
"command": "workbench.action.terminal.scrollToTop",
"when": "terminalFocus"
},
{
"key": "alt+down",
"command": "workbench.action.terminal.scrollToBottom",
"when": "terminalFocus"
},
{
"key": "alt+right",
"command": "editor.action.inlineSuggest.showNext",
"when": "textInputFocus && inlineSuggestionVisible"
},
{
"key": "alt+left",
"command": "editor.action.inlineSuggest.showPrevious",
"when": "inlineSuggestionVisible && textInputFocus"
},
{
"key": "alt+down",
"command": "editor.action.triggerSuggest",
"when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly && !suggestWidgetVisible && inlineSuggestionVisible"
},
// cmd+k clear terminal
{
"key": "cmd+k",
"command": "workbench.action.terminal.clear"
},
// cmd+shift+enter open terminal
{
"key": "cmd+shift+enter",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "cmd+shift+backspace",
"command": "workbench.action.terminal.kill"
},
{
"key": "ctrl+]",
"command": "ctrl+]",
"when": "editor.action.inlineSuggest.showNext"
},
{
"key": "shift+cmd+r",
"command": "-extension.vsKubernetesDescribe.Refresh",
"when": "vscodeKubernetesDescribeContext"
},
{
"key": "ctrl+c",
"command": "copilot-labs.use-brush-picker",
"when": "editorTextFocus"
},
{
"key": "ctrl+b",
"command": "-copilot-labs.use-brush-picker",
"when": "editorTextFocus"
},
{
"key": "alt+up",
"command": "-workbench.action.terminal.accessibleBufferGoToPreviousCommand",
"when": "accessibilityModeEnabled && terminalAccessibleBufferFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalAccessibleBufferFocus && terminalProcessSupported"
},
{
"key": "alt+down",
"command": "-workbench.action.terminal.accessibleBufferGoToNextCommand",
"when": "accessibilityModeEnabled && terminalAccessibleBufferFocus || accessibilityModeEnabled && terminalAccessibleBufferFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalAccessibleBufferFocus && terminalProcessSupported"
},
{
"key": "cmd+r",
"command": "-python.refreshTensorBoard",
"when": "python.hasActiveTensorBoardSession"
},
{
"key": "cmd+r",
"command": "-workbench.action.terminal.runRecentCommand",
"when": "accessibilityModeEnabled && terminalFocus && terminalHasBeenCreated || accessibilityModeEnabled && terminalFocus && terminalProcessSupported || accessibilityModeEnabled && accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal' || accessibilityModeEnabled && accessibleViewIsShown && terminalProcessSupported && accessibleViewCurrentProviderId == 'terminal'"
},
{
"key": "cmd+r",
"command": "-workbench.action.reloadWindow",
"when": "isDevelopment"
},
{
"key": "cmd+r",
"command": "renameFile",
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "enter",
"command": "-renameFile",
"when": "filesExplorerFocus && foldersViewVisible && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
}
]
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ members = [

[workspace.package]
version = "0.1.0"
edition = "2021"
edition = "2024"
repository = "https://github.com/unionlabs/tools"

[workspace.lints.rust]
Expand Down
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
{
packages = forEachSystem (system: {
devenv-up = self.devShells.${system}.default.config.procfileScript;
packages.${system}.devenv-test = self.devShells.${system}.default.config.test;

});
devShells = forEachSystem (
system:
Expand All @@ -49,6 +51,7 @@
channel = "nightly";
targets = [ ];
components = [
"miri"
"rustc"
"cargo"
"clippy"
Expand Down
6 changes: 4 additions & 2 deletions launcher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
cargo-features = ["edition2024"]

[package]
edition.workspace = true
repository.workspace = true
name = "launcher"
version = "0.1.0"
description = "Launches vscode server in the browser"
edition.workspace = true
repository.workspace = true

[dependencies]

Expand Down

0 comments on commit edd4221

Please sign in to comment.