Skip to content

Commit cdc25a6

Browse files
committed
CI: Run the new test in CI
This requires removing the "ping Google" step (dunno if we don't have ping or can't talk to Google specifically), but that only existed to help distinguish "the test VM lacks network" from "Nixathena is broken", and hopefully we've resolved the latter, so it's not a disaster.
1 parent afbf31d commit cdc25a6

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Run tests"
2+
on:
3+
pull_request:
4+
push:
5+
6+
jobs:
7+
tests:
8+
strategy:
9+
matrix:
10+
nixPath:
11+
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz
12+
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz
13+
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-24.05.tar.gz
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Install nix
19+
uses: cachix/install-nix-action@V28
20+
with:
21+
nix_path: "${{ matrix.nixPath }}"
22+
extra_nix_config: |
23+
experimental-features = nix-command flakes
24+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
25+
- name: Show nixpkgs version
26+
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
27+
- name: Run flake checks
28+
run: nix flake check
29+
- name: Run standard metapackage test
30+
run: nix run '.#test.meta-standard'

test/meta-standard.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ pkgs.nixosTest {
1919
# network-online.service is too long to wait
2020
# afsd.service is (seemingly) long enough to have network
2121
machine.wait_for_unit("afsd.service")
22-
machine.succeed("ping -c1 ipv4.google.com")
2322
[status, out] = machine.execute("ping -c1 google.com")
2423
print(out)
2524
machine.succeed('ls /afs/athena.mit.edu/')

0 commit comments

Comments
 (0)