Skip to content

chore: ignore local planning artifacts #3

chore: ignore local planning artifacts

chore: ignore local planning artifacts #3

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 102, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.PLAYGROUND_TAILSCALE_AUTHKEY != '', (Line: 109, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.PLAYGROUND_TAILSCALE_AUTHKEY != '', (Line: 162, Col: 13): Unrecognized named-value: 'secrets'. Located at position 13 within expression: always() && secrets.PLAYGROUND_TAILSCALE_AUTHKEY != ''
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
inputs:
run_playground_spawn_e2e:
description: Run the spawn payment e2e against the configured playground VPS.
required: false
default: false
type: boolean
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
validate:
if: ${{ github.event_name != 'workflow_dispatch' || !inputs.run_playground_spawn_e2e }}
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Setup Rust toolchain
shell: bash
run: |
set -euo pipefail
if ! command -v rustup >/dev/null 2>&1; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
. "$HOME/.cargo/env"
fi
rustup toolchain install stable --profile minimal
rustup default stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Setup Foundry
shell: bash
run: |
set -euo pipefail
base_dir="${XDG_CONFIG_HOME:-$HOME}"
foundry_dir="${FOUNDRY_DIR:-"$base_dir/.foundry"}"
foundry_bin_dir="$foundry_dir/bin"
curl -L https://foundry.paradigm.xyz | bash
"$foundry_bin_dir/foundryup"
echo "$foundry_bin_dir" >> "$GITHUB_PATH"
- name: Lint
run: npm run lint
- name: Test workspaces
run: npm run test
- name: Test factory
run: cargo test -p factory
- name: Test EVM contracts
run: forge test --root evm
- name: Build web image
run: |
docker build \
-f apps/web/Dockerfile \
--build-arg VITE_INDEXER_BASE_URL= \
-t automaton-playground-web:ci \
.
- name: Build indexer image
run: docker build -f apps/indexer/Dockerfile -t automaton-playground-indexer:ci .
- name: Build rpc-gateway image
run: docker build -f apps/rpc-gateway/Dockerfile -t automaton-playground-rpc-gateway:ci .
playground-spawn-payment-e2e:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_playground_spawn_e2e }}
runs-on: ubuntu-latest
timeout-minutes: 30
environment: playground-vps
steps:
- name: Install Tailscale
if: ${{ secrets.PLAYGROUND_TAILSCALE_AUTHKEY != '' }}
shell: bash
run: |
set -euo pipefail
curl -fsSL https://tailscale.com/install.sh | sh
- name: Join Tailnet
if: ${{ secrets.PLAYGROUND_TAILSCALE_AUTHKEY != '' }}
shell: bash
env:
TAILSCALE_AUTHKEY: ${{ secrets.PLAYGROUND_TAILSCALE_AUTHKEY }}
run: |
set -euo pipefail
sudo tailscale up \
--authkey="$TAILSCALE_AUTHKEY" \
--hostname="gha-playground-e2e-${GITHUB_RUN_ID}" \
--accept-routes=false \
--ssh=false
tailscale status
- name: Prepare SSH files
shell: bash
env:
VPS_KNOWN_HOSTS: ${{ secrets.PLAYGROUND_VPS_KNOWN_HOSTS }}
VPS_SSH_KEY: ${{ secrets.PLAYGROUND_VPS_SSH_KEY }}
PLAYGROUND_VPS_REPO_ROOT: ${{ vars.PLAYGROUND_VPS_REPO_ROOT }}
PLAYGROUND_ENV_FILE: /etc/automaton-playground/playground.env
run: |
set -euo pipefail
install -d -m 700 "$HOME/.ssh"
printf '%s\n' "$VPS_KNOWN_HOSTS" >"$HOME/.ssh/known_hosts"
printf '%s\n' "$VPS_SSH_KEY" >"$HOME/.ssh/id_ed25519"
chmod 600 "$HOME/.ssh/id_ed25519"
python3 - <<'PY' >"$RUNNER_TEMP/playground-e2e.env"
import os, shlex
values = {
"PLAYGROUND_VPS_REPO_ROOT": os.environ.get("PLAYGROUND_VPS_REPO_ROOT", ""),
"PLAYGROUND_ENV_FILE": os.environ.get("PLAYGROUND_ENV_FILE", ""),
}
for key, value in values.items():
if value:
print(f"{key}={shlex.quote(value)}")
PY
- name: Run remote spawn payment e2e
shell: bash
env:
VPS_HOST: ${{ secrets.PLAYGROUND_VPS_HOST }}
VPS_PORT: ${{ secrets.PLAYGROUND_VPS_PORT }}
VPS_USER: ${{ secrets.PLAYGROUND_VPS_USER }}
run: |
set -euo pipefail
port="${VPS_PORT:-22}"
repo_root="${PLAYGROUND_VPS_REPO_ROOT:-/srv/automaton-launchpad/current}"
remote_env="/tmp/automaton-playground-e2e-${GITHUB_RUN_ID}.env"
scp -P "$port" "$RUNNER_TEMP/playground-e2e.env" "${VPS_USER}@${VPS_HOST}:${remote_env}"
ssh -p "$port" "${VPS_USER}@${VPS_HOST}" \
"set -euo pipefail; . '${remote_env}'; repo_root=\${PLAYGROUND_VPS_REPO_ROOT:-${repo_root}}; if [ -n \"\${PLAYGROUND_ENV_FILE:-}\" ] && [ -f \"\${PLAYGROUND_ENV_FILE}\" ]; then . \"\${PLAYGROUND_ENV_FILE}\"; fi; cd \"\${repo_root}\"; npm run playground:spawn-payment-e2e; rm -f '${remote_env}'"
- name: Leave Tailnet
if: ${{ always() && secrets.PLAYGROUND_TAILSCALE_AUTHKEY != '' }}
shell: bash
run: |
set -euo pipefail
sudo tailscale logout || true