Skip to content

Commit

Permalink
Refine tasks and docs (#244)
Browse files Browse the repository at this point in the history
* Improve task isolations

* Keep README minimum

* Extract home-manager dependent tests from CI
  • Loading branch information
kachick committed Aug 2, 2023
1 parent 3b7419d commit 4ffdf34
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
tool_versions: |
cargo-make 0.36.12
# - run: go test
- run: makers test-race
- run: makers test-go-race
lint:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix-shell --run 'echo This step should be done before any other "nix-shell" steps because of measuring Nix build time'
- run: nix-shell --run 'makers ci'
- run: nix-shell --run 'makers ci-dev'
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Development

1. Install [Nix](https://nixos.org/) package manager
1. `nix-shell --command 'makers setup'`
- `direnv allow` may not work if you have not completed all the installation steps

## Note

This repository might be heavily customized to the author's home.
21 changes: 15 additions & 6 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,23 @@ script = [
]

[tasks.lint]
dependencies = ['build']
command = 'dist/lint'

[tasks.fmt]
dependencies = ['build']
command = 'dist/fmt'

[tasks.check]
alias = "lint"
dependencies = [
'build',
'test',
'lint',
'test-go-race',
]

[tasks.deps]
dependencies = ['build']
command = 'dist/deps'

[tasks.prepare-build]
Expand All @@ -48,7 +56,7 @@ args = [
'./...',
]

[tasks.test-race]
[tasks.test-go-race]
dependencies = ['prepare-build']
command = 'go'
args = [
Expand All @@ -61,7 +69,6 @@ args = [
]

[tasks.test]
dependencies = ['test-race']
command = 'home-manager'
args = [
'switch',
Expand All @@ -83,19 +90,21 @@ args = [
]

[tasks.enable_login_shells]
dependencies = ['build']
command = 'sudo'
args = [
'-E',
'dist/enable_nix_login_shells',
]

[tasks.ci]
[tasks.ci-dev]
dependencies = [
'default',
'setup',
'deps',
'build',
'test-race',
# 'test', # Needs home-manager, so needless in Nix-CI
'lint',
'test-go-race',
'fmt',
'check',
]
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@ Personal dotfiles that can be placed in the public repository

Also known as [盆栽(bonsai)](https://en.wikipedia.org/wiki/Bonsai) 🌳

## Development

1. Install [Nix](https://nixos.org/) package manager
1. Run `nix-shell`. (`nix-shell --command 'zsh'` and `direnv allow` may not work if you have not completed all the installation steps.)
1. `makers setup`

## Installation

1. Finishes [Development](#development) steps
1. Install [nix-community/home-manager](https://github.com/nix-community/home-manager)
1. `makers apply`
1. Install [Nix](https://nixos.org/) package manager
1. Install [home-manager](https://github.com/nix-community/home-manager)
1. `nix-shell --command 'makers apply'`

## I don't know ??? - I have just installed OS, I am 🚼

Expand Down

0 comments on commit 4ffdf34

Please sign in to comment.