generated from mrcjkb/nix-flake-github-ci-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ab2eada
Showing
13 changed files
with
766 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*.*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake -Lv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: "Nix build" | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
name: mrcjkb | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
- run: nix flake check --print-build-logs | ||
|
||
shell: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
- uses: cachix/cachix-action@v12 | ||
with: | ||
name: mrcjkb | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
- run: nix build .#devShells.x86_64-linux.default --print-build-logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
result | ||
.pre-commit-config.yaml | ||
.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
## [3.0.0] - 2023-01-02 | ||
|
||
### Added | ||
|
||
- Some pre-commit-hooks/lints. | ||
|
||
## [2.0.0] - 2023-01-02 | ||
|
||
### Changed | ||
|
||
- Replace `nixpkgs-fmt` with `alejandra`. | ||
|
||
## [1.0.0] - 2022-10-20 | ||
|
||
### Added | ||
|
||
- Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Contributing guide | ||
|
||
Contributions are more than welcome! | ||
|
||
Please don't forget to add your changes to the "Unreleased" section | ||
of [the changelog](./CHANGELOG.md) (if applicable). | ||
|
||
## Commit messages | ||
|
||
This project uses [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). | ||
|
||
## Development | ||
|
||
I use [`nix`](https://nixos.org/download.html#download-nix) for development and testing. | ||
|
||
To enter a development shell: | ||
|
||
```console | ||
nix-shell | ||
``` | ||
|
||
or (with flakes enabled) | ||
|
||
```console | ||
nix develop | ||
``` | ||
|
||
To apply formatting, while in a devShell, run | ||
|
||
```console | ||
pre-commit run --all | ||
``` | ||
|
||
If you use [`direnv`](https://direnv.net/), | ||
just run `direnv allow` and you will be dropped in this devShell. | ||
|
||
## Tests | ||
|
||
To run tests locally | ||
|
||
```console | ||
nix-build -A ci | ||
``` | ||
|
||
or (with flakes enabled) | ||
|
||
```console | ||
nix build .#checks.<your-system>.ci --print-build-logs | ||
``` | ||
|
||
For formatting: | ||
|
||
```console | ||
nix-build -A formatting | ||
``` | ||
|
||
or (with flakes enabled) | ||
|
||
```console | ||
nix build .#checks.<your-system>.formatting --print-build-logs | ||
``` | ||
|
||
If you have flakes enabled and just want to run all checks that are available, | ||
run: | ||
|
||
```console | ||
nix flake check --print-build-logs | ||
``` |
Oops, something went wrong.