Skip to content

Commit

Permalink
chore: use self-hosted runner for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elsirion committed Nov 13, 2024
1 parent 9da9c84 commit 2e48cfe
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 27 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,27 @@ jobs:

test:
name: Test
runs-on: ubuntu-latest
runs-on: [self-hosted, linux]
timeout-minutes: 30

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Install dependencies
uses: ./.github/actions/install-deps

- name: Setup Nix
uses: ./.github/actions/setup-nix
with:
cachix_auth_token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Setup Playwright
run: pnpm exec playwright install
- name: Setup Nix shell and run commands
run: |
nix develop --accept-flake-config --command bash << EOF
# Install dependencies
pnpm install
- name: Run Tests
run: nix develop -c pnpm test
# Run Tests
pnpm test
EOF
build-docs:
name: Build Docs
Expand Down
9 changes: 9 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@
fedimint.packages.${system}.devimint
fedimint.packages.${system}.gateway-pkgs
fedimint.packages.${system}.fedimint-pkgs
pkgs.pnpm
pkgs.nodejs_20
# The version of playwright in nixpkgs has to match the verison specified in package.json
pkgs.playwright-driver.browsers
] ++ prev.nativeBuildInputs;

shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
'';
});
};
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@vitest/ui": "^2.1.2",
"glob": "^10.4.5",
"happy-dom": "^15.7.4",
"playwright": "^1.47.2",
"playwright": "1.40.0",
"prettier": "^3.3.3",
"sherif": "^0.8.4",
"simple-git-hooks": "^2.11.1",
Expand Down
36 changes: 18 additions & 18 deletions pnpm-lock.yaml

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

0 comments on commit 2e48cfe

Please sign in to comment.