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: End-to-End Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
- 'docs/**' | |
jobs: | |
e2e-tests: | |
name: Run E2E Tests | |
runs-on: ubuntu-latest | |
services: | |
# Mailhog for email testing | |
mailhog: | |
image: mailhog/mailhog | |
ports: | |
- 1025:1025 # SMTP server | |
- 8025:8025 # Web interface | |
env: | |
API_BASE_URL: http://localhost:8100/api/v1 | |
CYPRESS_BASE_URL: http://localhost:8100 | |
CYPRESS_API_URL: http://localhost:8100/api/v1 | |
CHAINLAUNCH_USER: admin | |
CHAINLAUNCH_PASSWORD: admin123 | |
API_USERNAME: admin | |
API_PASSWORD: admin123 | |
PLAYWRIGHT_USER: admin | |
PLAYWRIGHT_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: | | |
# Create test data directory | |
mkdir -p testdata | |
# Start the application in the background | |
./chainlaunch serve --db data.db & | |
sleep 10 # Wait for the application to start | |
- name: Run API tests | |
run: | | |
go test -v ./e2e/... | |
- 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: test-results | |
path: | | |
web/cypress/videos | |
web/cypress/screenshots | |
test-results.xml |