Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
31 changes: 31 additions & 0 deletions .github/workflows/NixTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test Nix

on:
push:
pull_request:

jobs:
nix-flake-check:
name: Nix Flake Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: cachix/install-nix-action@v31

- name: Nix Flake Check
run: nix flake check

fission-playwright:
name: Fission Playwright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: cachix/install-nix-action@v31

- name: Run Playwright Tests
working-directory: "fission"
run: |
nix develop .#fission --command bash -c \
"git lfs pull && unzip public/assetpack.zip -d public && bun install && bun run test run ./src/test/APSTesting.test.ts"
Comment thread
0xda157 marked this conversation as resolved.
Outdated
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 17 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,28 @@
{
description = "Synthesis' Web-Based Robotics Simulator";


nixConfig = {
commit-lock-file-summary = "chore: update flake.lock";
};

inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

outputs =
{ self, nixpkgs }:
let
inherit (nixpkgs) lib;

supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];

forEachSupportedSystem =
f:
nixpkgs.lib.genAttrs supportedSystems (
lib.genAttrs supportedSystems (
system:
f {
inherit system;
Expand All @@ -34,13 +42,15 @@
nodejs
bun
git-lfs
# playwright-driver.browsers
playwright-test
playwright-driver.browsers
];

# env = {
# PLAYWRIGHT_BROWSERS_PATH = pkgs.playwright-driver.browsers;
# PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = true;
# };
env = {
PLAYWRIGHT_BROWSERS_PATH = pkgs.playwright-driver.browsers;
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = "true";
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
};
};
exporter = pkgs.mkShell {
packages = with pkgs; [
Expand All @@ -61,6 +71,6 @@
formatter = forEachSupportedSystem ({ pkgs, ... }: pkgs.nixfmt-tree);

# Build all devShells, instead of just verifying they are derivations
checks = forEachSupportedSystem ({ system, ... }: self.devShells.${system});
checks = forEachSupportedSystem ({ system, ... }: lib.attrsets.unionOfDisjoint self.devShells.${system} {});
};
}
Loading