Monitoring of nodes using prometheus #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: UI Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
- 'docs/**' | |
jobs: | |
ui-tests: | |
name: Run UI Tests | |
runs-on: ubuntu-latest | |
services: | |
mailhog: | |
image: mailhog/mailhog | |
ports: | |
- 1025:1025 | |
- 8025:8025 | |
env: | |
CYPRESS_BASE_URL: http://localhost:8100 | |
CYPRESS_API_URL: http://localhost:8100/api/v1 | |
PLAYWRIGHT_USER: admin | |
PLAYWRIGHT_PASSWORD: admin123 | |
CHAINLAUNCH_USER: admin | |
CHAINLAUNCH_PASSWORD: admin123 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.4' | |
cache: true | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Build chainlaunch-ui | |
run: | | |
cd web | |
bun install | |
export API_URL="/api" | |
bun run build | |
- name: Install dependencies | |
run: | | |
go mod download | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
- name: Build the application | |
run: | | |
go build -v -o chainlaunch ./main.go | |
chmod +x chainlaunch | |
- name: Start the application | |
run: | | |
mkdir -p testdata | |
./chainlaunch serve --db data.db & | |
sleep 10 | |
- name: Run UI tests | |
run: | | |
cd web | |
bun install | |
bun run test:e2e | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ui-test-results | |
path: | | |
web/cypress/videos | |
web/cypress/screenshots | |
test-results.xml |