Skip to content
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
11 changes: 7 additions & 4 deletions .github/workflows/deploy-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ on:
paths:
- 'airconsole-*.js'

permissions:
Comment thread
marc-n-dream marked this conversation as resolved.
contents: write

jobs:
generate-and-deploy:
name: Generate and deploy live docs
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Checkout the repository
uses: actions/checkout@v4
uses: actions/checkout@v7

# Install npm dependencies (global or local)
- name: Install npm dependencies
Expand All @@ -23,7 +26,7 @@ jobs:

# Install Python dependencies if required
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: '3.x'

Expand All @@ -34,7 +37,7 @@ jobs:

# Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/live # The directory containing the generated HTML files
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/deploy-beta-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,24 @@ on:
paths:
- 'beta/airconsole-*.js'

permissions:
contents: write

jobs:
generate-and-deploy:
name: Generate and deploy beta docs
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Checkout the repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Install npm dependencies
run: |
npm install -g jsdoc@3.6.11

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: '3.x'

Expand All @@ -31,7 +34,7 @@ jobs:
python .github/generate-docs.py --api=./beta/airconsole-1.11.1.js --target=beta

- name: Deploy to GitHub Pages (beta subdirectory)
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/beta
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/test-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test AirConsole API

# Replaces the Jenkins job "Test AirConsole API" (ci/jenkins.groovy). Public repo rules: read-only
# token, no secrets, actions/* only, no PR values in run:, no artifact upload.
on:
push:
# The branch filter keeps tag pushes out.
branches:
- '**'
pull_request:

permissions:
contents: read

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do we need the read permission for?

The information in the checkout we have and that should be the only thing we need, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed we need just in case global repo / org permissions would change, now it allows everything or every workflow by default and we're narrowing down the permissions here to be future-proof


concurrency:
group: test-api-${{ github.ref }}
cancel-in-progress: false

jobs:
test:
name: Playwright
runs-on: ubuntu-24.04
timeout-minutes: 15
defaults:
run:
working-directory: ci

steps:
- name: Checkout the repository
uses: actions/checkout@v7
with:
persist-credentials: false # Leaves no git token on disk for the later steps

- name: Set up Node
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
package-manager-cache: false

- name: Activate pnpm via corepack
env:
COREPACK_ENABLE_DOWNLOAD_PROMPT: '0'
run: |
corepack enable
corepack prepare pnpm@11.13.1 --activate
pnpm --version

- name: Install dependencies
run: |
pnpm install --frozen-lockfile

- name: Install Chromium
run: |
npx playwright install --with-deps chromium

- name: Run tests
run: |
npx playwright test --project chromium
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.18.0
2 changes: 2 additions & 0 deletions ci/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ This subtree owns the Playwright-based verification harness for the AppEngine-se

## Local Commands

- Install dependencies: `corepack enable && pnpm install --frozen-lockfile`
- Start static server: `npm run server`
- Run Playwright checks: `npm test`

## Local Invariants

- The CI harness serves the static API bundle root on port `9000`; keep Playwright config and server assumptions aligned.
- Prefer extending `api-tester.spec.js` and `playwright.config.js` instead of adding parallel test runners.
- `.github/workflows/test-api.yml` is the CI entry. The Jenkins job "Test AirConsole API" is being retired.
- Treat `jenkins.groovy` as CI contract glue, not general app logic.
Loading