Skip to content

Keep shared admin configuration forms within the viewport #107

Keep shared admin configuration forms within the viewport

Keep shared admin configuration forms within the viewport #107

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
GONOSUMCHECK: github.com/GoCodeAlone/*
GONOSUMDB: github.com/GoCodeAlone/*
GOPRIVATE: github.com/GoCodeAlone/*
jobs:
forms:
name: Shared forms browser QA
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Verify exact tested source
env:
EXPECTED_TEST_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: test "$(git rev-parse HEAD)" = "$EXPECTED_TEST_SHA"
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install isolated browser tooling
run: |
npm install --prefix "$RUNNER_TEMP/admin-ui" --no-audit --no-fund --save-exact playwright@1.61.1
"$RUNNER_TEMP/admin-ui/node_modules/.bin/playwright" install --with-deps chromium
- name: Exercise actual configuration and login forms
env:
CMS_PLAYWRIGHT_MODULE: ${{ runner.temp }}/admin-ui/package.json
CMS_UI_ARTIFACTS: ${{ runner.temp }}/admin-form-results
run: node test/form-usability-browser.cjs
- uses: actions/upload-artifact@v4
if: always()
with:
name: admin-form-browser-results
path: ${{ runner.temp }}/admin-form-results
retention-days: 7
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Verify exact tested source
env:
EXPECTED_TEST_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: test "$(git rev-parse HEAD)" = "$EXPECTED_TEST_SHA"
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Test shell session credential isolation
run: node --test test/*.test.cjs
- uses: actions/setup-go@v5
with:
go-version: '1.26'
cache: true
- name: Configure git for private modules
run: git config --global url."https://${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Resolve dependencies
run: go mod tidy
- name: Run go vet
run: go vet ./...
- name: Run go fmt check
run: |
if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then
echo "The following files are not formatted:"
gofmt -l .
exit 1
fi
build:
name: Cross-platform Build
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Verify exact tested source
env:
EXPECTED_TEST_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: test "$(git rev-parse HEAD)" = "$EXPECTED_TEST_SHA"
- uses: actions/setup-go@v5
with:
go-version: '1.26'
cache: true
- name: Configure git for private modules
run: git config --global url."https://${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Resolve dependencies
run: go mod tidy
- name: Build ${{ matrix.goos }}/${{ matrix.goarch }}
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
go build -o bin/workflow-plugin-admin-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/workflow-plugin-admin