Skip to content

Commit

Permalink
feat: final tweaks london gophers
Browse files Browse the repository at this point in the history
  • Loading branch information
hmajid2301 committed Nov 20, 2024
1 parent c708964 commit 4863a48
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 27 deletions.
16 changes: 8 additions & 8 deletions content/slides/go-lab-reproducible-envs-with-nix/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@ go run github.com/...../cmd/golangci-lint


```vim{3-6|9}
example on main via 🐹 v1.22.8
example on main via 🐹 v1.22.8
❯ ls -al
.rw-r--r-- 101 haseebmajid 28 Mar 15:36 go.mod
.rw-r--r-- 191 haseebmajid 28 Mar 15:37 go.sum
.rw-r--r-- 313 haseebmajid 28 Mar 15:33 main.go
.rw-r--r-- 0 haseebmajid 28 Mar 14:55 main_test.go
example on main via 🐹 v1.22.8
example on main via 🐹 v1.22.8
❯ nvim flake.nix
```

Expand Down Expand Up @@ -216,13 +216,13 @@ example on  main via 🐹 v1.22.8
---

```vim{2|5|8-9}
example on main via 🐹 v1.22.8
example on main via 🐹 v1.22.8
❯ which golangci-lint
example on main via 🐹 v1.22.8
example on main via 🐹 v1.22.8
❯ nix develop
example on main via 🐹 v1.22.8 ❄️ impure (nix-shell-env)
example on main via 🐹 v1.22.8 ❄️ impure (nix-shell-env)
❯ which golangci-lint
/nix/store/kcd...golangci-lint-1.56.2/bin/golangci-lint
```
Expand Down Expand Up @@ -296,18 +296,18 @@ direnv: error /home/haseeb/banterbus/.envrc
is blocked. Run `direnv allow` to approve
its content
banterbus on main via 🐹 v1.22.7
banterbus on main via 🐹 v1.22.7
❯ direnv allow
direnv: loading ~/banterbus/.envrc
direnv: using flake
direnv: nix-direnv: Renewed cache
...
banterbus on main via 🐹 v1.22.8 via ❄️ impure (nix-shell-env)
banterbus on main via 🐹 v1.22.8 via ❄️ impure (nix-shell-env)
❯ which golangci-lint
/nix/store/kcd...golangci-lint-1.56.2/bin/golangci-lint
banterbus on main via 🐹 v1.22.8 via ❄️ impure (nix-shell-env)
banterbus on main via 🐹 v1.22.8 via ❄️ impure (nix-shell-env)
❯ cd ..
direnv: unloading
Expand Down
25 changes: 6 additions & 19 deletions content/slides/london-gophers-reproducible-envs-with-nix/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ pkgs.dockerTools.buildImage {

## flake.nix

```nix{23-32|34-37}
```nix{23-32|34-37|38-40}
# flake.nix
{
description = "Development environment for BanterBus";
Expand Down Expand Up @@ -1006,6 +1006,9 @@ pkgs.dockerTools.buildImage {
inherit pkgs;
inherit devPackages;
};
devShells.default = pkgs.mkShell {
packages = devPackages;
};
})
);
}
Expand Down Expand Up @@ -1042,9 +1045,7 @@ publish:docker:ci:

---

# CI Improved

```yml{7-16|18-22}
```yml{6-16|8|9-14|18-22}
stages:
- deps
Expand All @@ -1066,25 +1067,11 @@ tests:unit:
extends:
- .task
script:
- task tests:unit
format:
extends:
- .task
script:
- task format
- go test -skip '^TestIntegration' ./internal/...
```

---

## Time Improvement

- unit tests job
- 2 minutes 28 seconds
- 54 seconds

---

<img width="75%" height="auto" data-src="images/i-like-nix.jpg">

[Credit](https://mstdn.social/@godmaire/111544747165375207)
Expand Down

0 comments on commit 4863a48

Please sign in to comment.