File tree Expand file tree Collapse file tree 7 files changed +292
-1
lines changed
Expand file tree Collapse file tree 7 files changed +292
-1
lines changed Original file line number Diff line number Diff line change 1+ root = true
2+
3+ [* ]
4+ indent_style = space
5+ indent_size = 2
6+ end_of_line = lf
7+ charset = utf-8
8+ trim_trailing_whitespace = false
9+ insert_final_newline = false
Original file line number Diff line number Diff line change 1+ ---
2+ name : Nix Formatting Check
3+
4+ on :
5+ push :
6+ branches : [ main ]
7+ pull_request :
8+ branches : [ main ]
9+ workflow_dispatch :
10+
11+ jobs :
12+ check-formatting :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v3
16+
17+ - name : Install Nix
18+ uses : cachix/install-nix-action@v22
19+ with :
20+ nix_path : nixpkgs=channel:nixos-unstable
21+ extra_nix_config : |
22+ experimental-features = nix-command flakes
23+
24+ - name : Install nixpkgs-fmt
25+ run : nix-env -iA nixpkgs.nixpkgs-fmt
26+
27+ - name : Check formatting
28+ run : find . -name "*.nix" -type f | xargs nixpkgs-fmt --check
Original file line number Diff line number Diff line change 1+ ---
2+ name : Pre-commit Checks
3+
4+ on :
5+ push :
6+ branches : [ main ]
7+ pull_request :
8+ branches : [ main ]
9+ workflow_dispatch :
10+
11+ jobs :
12+ pre-commit :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v3
16+
17+ - name : Setup Python
18+ uses : actions/setup-python@v4
19+ with :
20+ python-version : ' 3.10'
21+
22+ - uses : actions/cache@v3
23+ with :
24+ path : ~/.cache/pre-commit
25+ key : pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
26+
27+ - name : Install pre-commit
28+ run : pip install pre-commit
29+
30+ - name : Run pre-commit hooks
31+ run : pre-commit run --all-files
Original file line number Diff line number Diff line change 1+ ---
2+ name : Vagrant VM Test
3+
4+ on :
5+ # Run only manually or on major changes to minimize macOS runner usage
6+ workflow_dispatch :
7+ push :
8+ branches : [ main ]
9+ paths :
10+ - ' vagrant/**'
11+ - ' Vagrantfile'
12+ - ' flake.nix'
13+ - ' flake.lock'
14+ pull_request :
15+ branches : [ main ]
16+ paths :
17+ - ' vagrant/**'
18+ - ' Vagrantfile'
19+ - ' flake.nix'
20+ - ' flake.lock'
21+
22+ jobs :
23+ # First job: Just validate the Vagrantfile syntax on Linux (cheaper)
24+ validate :
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@v3
28+
29+ - name : Install Vagrant
30+ run : |
31+ wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
32+ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
33+ sudo apt update && sudo apt install vagrant
34+
35+ - name : Validate Vagrantfile
36+ run : vagrant validate
37+
38+ # Only run the more expensive macOS test if explicitly requested via workflow_dispatch
39+ # example: gh repo run workflow vagrant-test --ref main
40+ vagrant-test :
41+ needs : validate
42+ if : github.event_name == 'workflow_dispatch'
43+ runs-on : macos-latest
44+ steps :
45+ - uses : actions/checkout@v3
46+
47+ - name : Install Vagrant and UTM
48+ run : |
49+ brew install hashicorp/tap/hashicorp-vagrant
50+ brew install --cask utm
51+
52+ - name : Install vagrant-utm plugin
53+ run : vagrant plugin install vagrant-utm
54+
55+ - name : Run VM and test provisioning
56+ run : |
57+ # Start VM with minimal resources for CI
58+ UTM_MEMORY=4096 UTM_CPUS=2 vagrant up --no-provision
59+
60+ # Run only the RAM disk provisioner to test it specifically
61+ vagrant provision --provision-with "shell"
62+
63+ # Test RAM disk setup
64+ vagrant ssh -c "ls -la /ramdisk"
65+
66+ # Clean up
67+ vagrant destroy -f
Original file line number Diff line number Diff line change 1+ ---
2+ repos :
3+ - repo : https://github.com/pre-commit/pre-commit-hooks
4+ rev : v5.0.0
5+ hooks :
6+ - id : trailing-whitespace
7+ - id : end-of-file-fixer
8+ - id : check-yaml
9+ - id : check-added-large-files
10+ - id : detect-private-key
11+ - id : check-merge-conflict
12+ - id : mixed-line-ending
13+ args : ['--fix=lf']
14+
15+ - repo : https://github.com/nix-community/nixpkgs-fmt
16+ rev : v1.3.0
17+ hooks :
18+ - id : nixpkgs-fmt
19+ name : nixpkgs-fmt
20+ description : Format nix code with nixpkgs-fmt
21+ entry : nixpkgs-fmt
22+ language : system
23+ files : \.nix$
24+
25+ - repo : https://github.com/gitleaks/gitleaks
26+ rev : v8.25.1
27+ hooks :
28+ - id : gitleaks
29+ name : gitleaks
30+ description : Detect secrets in your files
31+ entry : gitleaks protect --verbose --redact --staged
32+ language : golang
33+ pass_filenames : false
34+
35+ - repo : local
36+ hooks :
37+ - id : shellcheck
38+ name : shellcheck
39+ description : Lint shell scripts with shellcheck
40+ entry : shellcheck
41+ language : system
42+ types : [shell]
43+ exclude_types : [zsh]
44+
45+ - id : vagrant-validate
46+ name : Vagrant Validate
47+ description : Validate Vagrantfile syntax
48+ entry : vagrant validate
49+ language : system
50+ files : ^Vagrantfile$
51+ pass_filenames : false
Original file line number Diff line number Diff line change 44 homebrew = {
55 enable = true ;
66 taps = [ "FelixKratz/formulae" "hashicorp/tap" ] ;
7- brews = [ "mas" "dockutil" ] ;
7+ brews = [ "mas" "dockutil" "pre-commit" ] ;
88 casks = [
99 # Security & Password Management
1010 "1password"
Original file line number Diff line number Diff line change 1+ {
2+ "$schema" : " https://docs.renovatebot.com/renovate-schema.json" ,
3+ "extends" : [
4+ " config:recommended" ,
5+ " :semanticCommits" ,
6+ " :enableVulnerabilityAlerts"
7+ ],
8+ "labels" : [
9+ " dependencies"
10+ ],
11+ "packageRules" : [
12+ {
13+ "matchManagers" : [
14+ " nix"
15+ ],
16+ "addLabels" : [
17+ " nix"
18+ ],
19+ "pinDigests" : true
20+ },
21+ {
22+ "matchDepTypes" : [
23+ " github-actions"
24+ ],
25+ "addLabels" : [
26+ " github-actions"
27+ ],
28+ "groupName" : " github-actions" ,
29+ "pinDigests" : true
30+ },
31+ {
32+ "matchManagers" : [
33+ " pre-commit"
34+ ],
35+ "addLabels" : [
36+ " pre-commit"
37+ ],
38+ "pinDigests" : true
39+ },
40+ {
41+ "matchUpdateTypes" : [
42+ " minor" ,
43+ " patch" ,
44+ " pin" ,
45+ " digest"
46+ ],
47+ "automerge" : true
48+ },
49+ {
50+ "matchDepPatterns" : [
51+ " ^nixpkgs"
52+ ],
53+ "schedule" : [
54+ " every 2 weeks"
55+ ],
56+ "pinDigests" : true
57+ },
58+ {
59+ "matchPackagePatterns" : [
60+ " .*"
61+ ],
62+ "pinDigests" : true
63+ }
64+ ],
65+ "nix" : {
66+ "enabled" : true ,
67+ "fileMatch" : [
68+ " ^flake\\ .nix$" ,
69+ " ^overlays\\ /.*\\ .nix$" ,
70+ " ^common\\ /.*\\ .nix$" ,
71+ " ^darwin\\ /.*\\ .nix$" ,
72+ " ^vagrant\\ /.*\\ .nix$"
73+ ]
74+ },
75+ "pre-commit" : {
76+ "enabled" : true ,
77+ "fileMatch" : [
78+ " ^\\ .pre-commit-config\\ .ya?ml$"
79+ ]
80+ },
81+ "github-actions" : {
82+ "fileMatch" : [
83+ " ^\\ .github/workflows/[^/]+\\ .ya?ml$"
84+ ],
85+ "enabled" : true
86+ },
87+ "separateMajorMinor" : true ,
88+ "dependencyDashboard" : false ,
89+ "schedule" : [
90+ " every weekend"
91+ ],
92+ "prConcurrentLimit" : 5 ,
93+ "prHourlyLimit" : 2 ,
94+ "rebaseWhen" : " auto" ,
95+ "ignorePaths" : [
96+ " **/node_modules/**"
97+ ],
98+ "pinDigests" : true ,
99+ "lockFileMaintenance" : {
100+ "enabled" : true ,
101+ "schedule" : [
102+ " before 5am on Monday"
103+ ]
104+ }
105+ }
You can’t perform that action at this time.
0 commit comments