Add a trivial test suite

This commit is contained in:
Graham Christensen 2024-10-28 11:02:04 -04:00
parent f348ee45fb
commit ddbea5e1e7
4 changed files with 71 additions and 0 deletions
.github/workflows
README.md
tests/smoke

28
.github/workflows/validate.yml vendored Normal file
View file

@ -0,0 +1,28 @@
on:
push:
pull_request:
workflow_dispatch:
jobs:
lints:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: git checkout
uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix run nixpkgs#action-validator -- -v ./.github/workflows/workflow.yml
- run: nix run nixpkgs#nodePackages.prettier -- --check .
DeterminateCI:
uses: DeterminateSystems/ci/.github/workflows/workflow.yml@main
permissions:
id-token: "write"
contents: "read"
with:
directory: ./tests/smoke

View file

@ -117,6 +117,8 @@ jobs:
## Notes
Contributors: please format all files with `nix run nixpkgs#nodePackages.prettier -- --write .` before committing.
Use of this workflow uses a collection of GitHub Action by Determinate Systems, which are covered by the Determinate Systems [privacy policy][privacy policy] and [terms of service][tos].
[flake-schemas]: https://determinate.systems/posts/flake-schemas/

25
tests/smoke/flake.lock generated Normal file
View file

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1729880355,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
"revCount": 696981,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.696981%2Brev-18536bf04cd71abd345f9579158841376fdd0c5a/0192cc00-028d-731c-91e9-e50f0dd89c03/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.tar.gz"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

16
tests/smoke/flake.nix Normal file
View file

@ -0,0 +1,16 @@
{
inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.tar.gz";
};
outputs = { self, nixpkgs }: {
devShells.x86_64-linux.default = with nixpkgs.legacyPackages.x86_64-linux; mkShell {
name = "devshell";
buildInputs = [
hello
];
};
packages.aarch64-darwin.default = nixpkgs.legacyPackages.aarch64-darwin.hello;
};
}