Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(draft): darwin tests #1453

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ jobs:
run: './ci/check-tests.sh'
env:
NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"
coverage-darwin:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Nix
uses: cachix/install-nix-action@v12
- name: Prefetch shell.nix
run: "nix-shell --run true"
- name: Coverage
run: "./ci/check-tests.sh"
env:
NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"
docs:
runs-on: ubuntu-latest
steps:
Expand Down
11 changes: 6 additions & 5 deletions nix/eval-machine-info.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ let
else import (pkgs.path + "/nixos/lib/eval-config.nix");

pkgs = if flakeUri != null
then
if network ? nixpkgs
then (builtins.head network.nixpkgs).legacyPackages.${system}
else throw "NixOps network must have a 'nixpkgs' attribute"
else (builtins.head (network.network)).nixpkgs or (import <nixpkgs> { inherit system; });
then
if network ? nixpkgs
then (builtins.head network.nixpkgs).legacyPackages.${system}
else throw "NixOps network must have a 'nixpkgs' attribute"
else if network ? nixpkgs then (builtins.head (network.nixpkgs))
else (import <nixpkgs> { inherit system; });

inherit (pkgs) lib;

Expand Down
2 changes: 1 addition & 1 deletion nixops/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def download_file(self, source: str, target: str, recursive: bool = False):
)
return self._logged_exec(cmdline)

def get_console_output(self):
def get_console_output(self) -> str:
return "(not available for this machine type)\n"


Expand Down