mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-28 19:23:48 +01:00
tests: Ensure latest joshuto commit
This commit is contained in:
parent
07ec31364f
commit
cfcb2033a8
@ -1,5 +1,7 @@
|
||||
require "spec"
|
||||
require "colorize"
|
||||
require "http/client"
|
||||
require "json"
|
||||
|
||||
describe "nix-config" do
|
||||
it "includes all modules" do
|
||||
@ -13,4 +15,17 @@ describe "nix-config" do
|
||||
puts "✓".colorize(:green)
|
||||
end
|
||||
end
|
||||
|
||||
it "uses the latest joshuto commit" do
|
||||
response = HTTP::Client.get "https://api.github.com/repos/kamiyaa/joshuto/branches/main"
|
||||
response.status_code.should eq(200)
|
||||
json = JSON.parse(response.body)
|
||||
|
||||
File.read_lines("./overlays/joshuto/default.nix").each do |line|
|
||||
if line.includes? "version ="
|
||||
nix_hash = line.split('"')[1]
|
||||
json["commit"]["sha"].should eq(nix_hash)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user