Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use self-hosted runner for integration tests #81

Merged
merged 1 commit into from
Nov 13, 2024
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
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.