Skip to content

Commit 38b0826

Browse files
committed
dev: cleanup tests and dev files
1 parent 0fe030c commit 38b0826

8 files changed

Lines changed: 44 additions & 119 deletions

File tree

‎.envrc‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎.github/workflows/test.yml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
name: cachix-action
3333
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
3434
useDaemon: ${{ matrix.useDaemon }}
35-
- run: nix-build test.nix
35+
- run: nix-build tests
3636

3737
public-cache-no-signing-key:
3838
strategy:
@@ -48,7 +48,7 @@ jobs:
4848
uses: ./
4949
with:
5050
name: cachix-action
51-
- run: nix-build test.nix
51+
- run: nix-build tests
5252

5353
private-cache:
5454
# Only run when secrets are available
@@ -70,7 +70,7 @@ jobs:
7070
signingKey: "${{ secrets.CACHIX_SIGNING_KEY_PRIVATE }}"
7171
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
7272
useDaemon: ${{ matrix.useDaemon }}
73-
- run: nix-build test.nix
73+
- run: nix-build tests
7474

7575
push-paths:
7676
strategy:
@@ -84,7 +84,7 @@ jobs:
8484
install_url: ${{ inputs.install_url }}
8585
- id: paths
8686
run: |
87-
paths=$(nix-instantiate test.nix | tr '\n' ' ')
87+
paths=$(nix-instantiate tests | tr '\n' ' ')
8888
echo "OUT_PATHS=$paths" >> "$GITHUB_OUTPUT"
8989
- name: Test pushPaths
9090
uses: ./
@@ -109,7 +109,7 @@ jobs:
109109
name: cachix-action
110110
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
111111
installCommand: "nix-env -j8 -f https://cachix.org/api/v1/install -iA cachix"
112-
- run: nix-build test.nix
112+
- run: nix-build tests
113113

114114
nix-master:
115115
strategy:
@@ -139,7 +139,7 @@ jobs:
139139
with:
140140
name: cachix-action
141141
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
142-
- run: nix-build test.nix
142+
- run: nix-build tests
143143

144144
determinate-nix-pull:
145145
strategy:
@@ -154,7 +154,7 @@ jobs:
154154
with:
155155
name: cachix-action
156156
skipPush: true
157-
- run: nix-build test.nix
157+
- run: nix-build tests
158158

159159
determinate-nix-push:
160160
if: ${{ github.secret_source == 'Actions' }}
@@ -173,7 +173,7 @@ jobs:
173173
authToken: ${{ matrix.auth == 'auth-token-and-signing-key' && secrets.CACHIX_AUTH_TOKEN || '' }}
174174
signingKey: ${{ matrix.auth == 'signing-key' && secrets.CACHIX_SIGNING_KEY || secrets.CACHIX_SIGNING_KEY_PRIVATE }}
175175
useDaemon: ${{ matrix.auth == 'signing-key' }}
176-
- run: nix-build test.nix
176+
- run: nix-build tests
177177

178178
lix-pull:
179179
strategy:
@@ -188,7 +188,7 @@ jobs:
188188
with:
189189
name: cachix-action
190190
skipPush: true
191-
- run: nix-build test.nix
191+
- run: nix-build tests
192192

193193
lix-push:
194194
if: ${{ github.secret_source == 'Actions' }}
@@ -207,4 +207,4 @@ jobs:
207207
authToken: ${{ matrix.auth == 'auth-token-and-signing-key' && secrets.CACHIX_AUTH_TOKEN || '' }}
208208
signingKey: ${{ matrix.auth == 'signing-key' && secrets.CACHIX_SIGNING_KEY || secrets.CACHIX_SIGNING_KEY_PRIVATE }}
209209
useDaemon: ${{ matrix.auth == 'signing-key' }}
210-
- run: nix-build test.nix
210+
- run: nix-build tests

‎.gitignore‎

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,25 @@
1-
__tests__/runner/*
2-
3-
# comment out in distribution branches
41
node_modules/
52

6-
# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
7-
# Logs
83
logs
94
*.log
105
npm-debug.log*
11-
yarn-debug.log*
12-
yarn-error.log*
13-
lerna-debug.log*
146

157
# Diagnostic reports (https://nodejs.org/api/report.html)
168
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
179

18-
# Runtime data
19-
pids
20-
*.pid
21-
*.seed
22-
*.pid.lock
23-
24-
# Directory for instrumented libs generated by jscoverage/JSCover
25-
lib-cov
26-
27-
# Coverage directory used by tools like istanbul
28-
coverage
29-
*.lcov
30-
31-
# nyc test coverage
32-
.nyc_output
33-
34-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
35-
.grunt
36-
37-
# Bower dependency directory (https://bower.io/)
38-
bower_components
39-
40-
# node-waf configuration
41-
.lock-wscript
42-
43-
# Compiled binary addons (https://nodejs.org/api/addons.html)
44-
build/Release
45-
46-
# Dependency directories
47-
jspm_packages/
48-
49-
# TypeScript v1 declaration files
50-
typings/
51-
52-
# TypeScript cache
53-
*.tsbuildinfo
54-
5510
# Optional npm cache directory
5611
.npm
5712

58-
# Optional eslint cache
59-
.eslintcache
60-
6113
# Optional REPL history
6214
.node_repl_history
6315

6416
# Output of 'npm pack'
6517
*.tgz
6618

67-
# Yarn Integrity file
68-
.yarn-integrity
69-
7019
# dotenv environment variables file
7120
.env
7221
.env.test
7322

74-
# parcel-bundler cache (https://parceljs.org/)
75-
.cache
76-
77-
# next.js build output
78-
.next
79-
80-
# nuxt.js build output
81-
.nuxt
82-
83-
# vuepress build output
84-
.vuepress/dist
85-
86-
# Serverless directories
87-
.serverless/
88-
89-
# FuseBox cache
90-
.fusebox/
91-
92-
# DynamoDB Local files
93-
.dynamodb/
94-
95-
# Skip the lib folder
96-
lib/
97-
9823
# Devenv
9924
.devenv*
10025
devenv.local.nix
@@ -104,4 +29,3 @@ devenv.local.nix
10429

10530
# pre-commit
10631
.pre-commit-config.yaml
107-

‎CONTRIBUTING.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,10 @@ Build the action.
2020
pnpm build
2121
```
2222

23+
Run the Nix integration fixture.
24+
25+
```console
26+
nix-build tests
27+
```
28+
2329
The devenv shell will install git-hooks that must be run before each commit.

‎test-with-arg.nix‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎test.nix‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎tests/default.nix‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Realizes `num` derivations of `size` MB each.
2+
{
3+
pkgs ? import ./nixpkgs.nix,
4+
size ? 1,
5+
num ? 10,
6+
currentTime ? builtins.currentTime,
7+
}:
8+
9+
let
10+
drv =
11+
i:
12+
pkgs.runCommand "${toString currentTime}-${toString i}" { } ''
13+
dd if=/dev/zero of=$out bs=${toString size}MB count=1
14+
'';
15+
in
16+
pkgs.lib.listToAttrs (
17+
builtins.map (i: pkgs.lib.nameValuePair "drv${toString i}" (drv i)) (pkgs.lib.range 1 num)
18+
)

‎tests/nixpkgs.nix‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
let
2+
# Keep the integration fixture on the same Nixpkgs revision as the dev shell.
3+
lock = builtins.fromJSON (builtins.readFile ../devenv.lock);
4+
nixpkgs = lock.nodes.${lock.nodes.root.inputs.nixpkgs}.locked;
5+
in
6+
import (builtins.fetchTarball {
7+
name = "nixpkgs-${nixpkgs.rev}";
8+
url = "https://github.com/${nixpkgs.owner}/${nixpkgs.repo}/archive/${nixpkgs.rev}.tar.gz";
9+
sha256 = nixpkgs.narHash;
10+
}) { }

0 commit comments

Comments
 (0)