Skip to content
Merged
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 2 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: npm install -g @devcontainers/cli

- name: "Generating Debian tests for '${{ matrix.features }}'"
run: devcontainer features test -f ${{ matrix.features }} -i debian --preserve-test-containers
run: devcontainer features test -f ${{ matrix.features }} -i debian:bookworm --preserve-test-containers
test-ubuntu:
needs: validate
name: "Test on Ubuntu Linux"
Expand All @@ -43,6 +43,7 @@ jobs:
features:
- rye
- cypress
- playwright
steps:
- uses: actions/checkout@v4

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,4 @@ dist

# Finder (MacOS) folder config
.DS_Store
.direnv
27 changes: 27 additions & 0 deletions flake.lock

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

34 changes: 34 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:

let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in
{

nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ config, pkgs, ... }:
{
virtualisation.docker.enable = true;
users.users.schlich.extraGroups = [ "docker" ];
}
)
];
};
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
deno
devcontainer
docker
];
};
};
}
22 changes: 15 additions & 7 deletions src/playwright/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
{
"id": "playwright",
"version": "0.1.0",
"name": "Playwright",
"description": "Playwright enables reliable end-to-end testing for modern web apps.",
"dependsOn": {
"ghcr.io/devcontainers/features/node:1": {}
"id": "playwright",
"version": "0.1.1",
"name": "Playwright",
"description": "Playwright enables reliable end-to-end testing for modern web apps.",
"dependsOn": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/node:1": {}
},
"options": {
"browsers": {
"type": "string",
"description": "A SPACE-separated list of browsers to install",
"default": ""
}
}
}
}
2 changes: 1 addition & 1 deletion src/playwright/install.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

npx playwright install --with-deps
npx playwright install --with-deps ${BROWSERS}
18 changes: 18 additions & 0 deletions test/playwright/scenarios.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"select_single_browser": {
"image": "ubuntu:focal",
"features": {
"playwright": {
"browsers": "firefox"
}
}
},
"select_multiple_browsers": {
"image": "ubuntu:focal",
"features": {
"playwright": {
"browsers": "firefox chromium"
}
}
}
}
12 changes: 12 additions & 0 deletions test/playwright/select_multiple_browsers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

source dev-container-features-test-lib

echo "$(npx playwright install --list)"

check "Multiple browsers" bash -c '[[ $(npx playwright install --list) == *firefox* ]]'
check "Multiple browsers" bash -c '[[ $(npx playwright install --list) == *chromium* ]]'

reportResults
9 changes: 9 additions & 0 deletions test/playwright/select_single_browser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

source dev-container-features-test-lib

check "Chromium missing" bash -c '[[ $(npx playwright install --list) != *chromium* ]]'

reportResults
2 changes: 1 addition & 1 deletion test/playwright/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ source dev-container-features-test-lib

check "get version" npx playwright --version

reportResults
reportResults