diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 0000000..d4e9bc0 --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,22 @@ +name: "UI Test" +on: + pull_request: + push: +jobs: + ui_test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v25 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - uses: DeterminateSystems/magic-nix-cache-action@v2 + - run: nix develop -c -- nix run .\#initialise-data + - run: nix develop -c -- nix run .\#test_ui + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 + diff --git a/flake.nix b/flake.nix index a4cfc64..d29095f 100644 --- a/flake.nix +++ b/flake.nix @@ -53,6 +53,8 @@ if "${system}" == "x86_64-linux" then "${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive" else ""; + LANG = "en_US.UTF-8"; + LC_ALL = "en_US.UTF-8"; R_LIBS_USER = "''"; # to not use users' installed R packages R_ZIPCMD = "${pkgs.zip}/bin/zip"; TEST_PORT = 3000; diff --git a/tests_UI/test-1.spec.ts b/tests_UI/test-1.spec.ts index 21fe911..4bbc110 100644 --- a/tests_UI/test-1.spec.ts +++ b/tests_UI/test-1.spec.ts @@ -77,7 +77,7 @@ test.describe("PlantBreedGame_UI", () => { }); test("Large_requests/full campaing", async ({ page }) => { - test.setTimeout(120_000); + test.setTimeout(180_000); await login(page, "admin", psw); await addBreeder(page, "test_UI", psw, "tester");