Skip to content

Commit

Permalink
test(UI): add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
juliendiot42 committed Apr 23, 2024
1 parent 6ce9dcc commit e7be867
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -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

2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests_UI/test-1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit e7be867

Please sign in to comment.