Website/frontend: add section for frontend components #5
Workflow file for this run
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: Test Documentation Scripts - Frontend | |
# Test locally with: | |
# ```bash | |
# # Ubuntu 22.04 (recommended) | |
# gh extension exec act \ | |
# --workflows .github/workflows/test-docs-scripts-frontend.yaml \ | |
# --matrix os:ubuntu-22.04 | |
# | |
# # Ubuntu 24.04 (requires platform mapping) | |
# gh extension exec act \ | |
# --workflows .github/workflows/test-docs-scripts-frontend.yaml \ | |
# --matrix os:ubuntu-24.04 \ | |
# -P ubuntu-24.04=catthehacker/ubuntu:act-24.04 | |
# ``` | |
on: | |
push: | |
jobs: | |
test-frontend-scripts: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, ubuntu-24.04, macos-latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Make scripts executable | |
run: | | |
chmod +x website/docs/developers/scripts/frontend/*.sh | |
- name: Install Node.js on Linux | |
if: runner.os == 'Linux' | |
run: | | |
bash website/docs/developers/scripts/frontend/install-nodejs-linux.sh | |
# Set up nvm environment for future steps | |
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV | |
- name: Install Node.js on macOS | |
if: runner.os == 'macOS' | |
run: | | |
bash website/docs/developers/scripts/frontend/install-nodejs-macos.sh | |
- name: Install Angular CLI using documentation script | |
run: | | |
# Source nvm if available (Linux) | |
if [ -n "$NVM_DIR" ] && [ -s "$NVM_DIR/nvm.sh" ]; then | |
\. "$NVM_DIR/nvm.sh" | |
fi | |
bash website/docs/developers/scripts/frontend/install-angular-cli.sh | |
- name: Install gtimeout on macOS | |
if: runner.os == 'macOS' | |
run: | | |
brew install coreutils | |
# Create symlink for timeout command | |
sudo ln -sf /usr/local/bin/gtimeout /usr/local/bin/timeout | |
- name: Test install dependencies script | |
run: | | |
# Source nvm if available (Linux) | |
if [ -n "$NVM_DIR" ] && [ -s "$NVM_DIR/nvm.sh" ]; then | |
\. "$NVM_DIR/nvm.sh" | |
fi | |
bash website/docs/developers/scripts/frontend/install-dependencies.sh | |
- name: Test build development script | |
run: | | |
# Source nvm if available (Linux) | |
if [ -n "$NVM_DIR" ] && [ -s "$NVM_DIR/nvm.sh" ]; then | |
\. "$NVM_DIR/nvm.sh" | |
fi | |
bash website/docs/developers/scripts/frontend/build-development.sh | |
- name: Test build production script | |
run: | | |
# Source nvm if available (Linux) | |
if [ -n "$NVM_DIR" ] && [ -s "$NVM_DIR/nvm.sh" ]; then | |
\. "$NVM_DIR/nvm.sh" | |
fi | |
bash website/docs/developers/scripts/frontend/build-production.sh | |
- name: Test format code script | |
run: | | |
# Source nvm if available (Linux) | |
if [ -n "$NVM_DIR" ] && [ -s "$NVM_DIR/nvm.sh" ]; then | |
\. "$NVM_DIR/nvm.sh" | |
fi | |
bash website/docs/developers/scripts/frontend/format-code.sh | |
- name: Prepare for Cypress tests | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
# Install Cypress dependencies with Ubuntu version compatibility | |
if grep -q "24.04" /etc/os-release; then | |
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev \ | |
libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb | |
else | |
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev \ | |
libnss3 libxss1 libasound2 libxtst6 xauth xvfb | |
fi | |
- name: Test start development script with timeout | |
run: | | |
# Source nvm if available (Linux) | |
if [ -n "$NVM_DIR" ] && [ -s "$NVM_DIR/nvm.sh" ]; then | |
\. "$NVM_DIR/nvm.sh" | |
fi | |
# Test start-development script with timeout | |
timeout 30s bash website/docs/developers/scripts/frontend/start-development.sh || true | |
- name: Test run tests script | |
run: | | |
# Source nvm if available (Linux) | |
if [ -n "$NVM_DIR" ] && [ -s "$NVM_DIR/nvm.sh" ]; then | |
\. "$NVM_DIR/nvm.sh" | |
fi | |
bash website/docs/developers/scripts/frontend/run-tests.sh | |
- name: Verify build output | |
run: | | |
ls -la frontend/dist/frontend/browser/ | |
test -f frontend/dist/frontend/browser/index.html |