fix(alt-text): reject unmanaged collections in generate endpoints (#162) #525
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies in all packages | |
| run: pnpm install:all | |
| - name: Run format | |
| run: pnpm format:all | |
| - name: Check for formatting changes in all packages | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "Code formatting changes detected. Please run 'pnpm format' locally and commit the changes." | |
| git status | |
| git diff | |
| exit 1 | |
| fi | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: format | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install:all | |
| - name: Run ESLint (admin-search) | |
| run: cd admin-search && pnpm lint | |
| - name: Run ESLint (alt-text) | |
| run: cd alt-text && pnpm lint | |
| - name: Run ESLint (cloudinary) | |
| run: cd cloudinary && pnpm lint | |
| - name: Run ESLint (geocoding) | |
| run: cd geocoding && pnpm lint | |
| - name: Run ESLint (pages) | |
| run: cd pages && pnpm lint | |
| - name: Run ESLint (content-translator) | |
| run: cd content-translator && pnpm lint | |
| - name: Run ESLint (astro-payload-richtext-lexical) | |
| run: cd astro-payload-richtext-lexical && pnpm lint | |
| - name: Run ESLint (vercel-deployments) | |
| run: cd vercel-deployments && pnpm lint | |
| - name: Run ESLint (chat-agent) | |
| run: cd chat-agent && pnpm lint | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| needs: format | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install:all | |
| - name: Typecheck all plugins | |
| run: pnpm typecheck:all | |
| test-unit: | |
| runs-on: ubuntu-latest | |
| needs: format | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install:all | |
| - name: Run tests (admin-search) | |
| run: cd admin-search && pnpm test | |
| - name: Run tests (alt-text) | |
| run: cd alt-text && pnpm test | |
| - name: Run tests (astro-payload-richtext-lexical) | |
| run: cd astro-payload-richtext-lexical && pnpm test | |
| - name: Run tests (cloudinary) | |
| run: cd cloudinary && pnpm test | |
| - name: Run tests (content-translator) | |
| run: cd content-translator && pnpm test | |
| - name: Run tests (pages) | |
| run: cd pages && pnpm test:unit | |
| - name: Run tests (vercel-deployments) | |
| run: cd vercel-deployments && pnpm test | |
| - name: Run tests (chat-agent) | |
| run: cd chat-agent && pnpm test | |
| test-pages-localized: | |
| runs-on: ubuntu-latest | |
| needs: format | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| database: [mongodb, sqlite] | |
| name: test-pages-localized-${{ matrix.database }} | |
| services: | |
| mongodb: | |
| image: ${{ matrix.database == 'mongodb' && 'mongo:7.0' || '' }} | |
| ports: | |
| - 27017:27017 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup environment variables | |
| run: | | |
| # Set up environment variables for the dev app | |
| echo "PAYLOAD_SECRET=test-secret-not-for-production" > pages/dev/.env | |
| echo "NEXT_PUBLIC_FRONTEND_URL=http://localhost:4321" >> pages/dev/.env | |
| if [ "${{ matrix.database }}" = "mongodb" ]; then | |
| echo "MONGODB_URL=mongodb://localhost:27017/plugin-pages-dev-test" >> pages/dev/.env | |
| else | |
| echo "SQLITE_URL=file:./payload-test.db" >> pages/dev/.env | |
| fi | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install:all | |
| - name: Run tests | |
| run: cd pages && pnpm test:localized:${{ matrix.database }} | |
| env: | |
| PAYLOAD_DATABASE: ${{ matrix.database }} | |
| test-pages-unlocalized: | |
| runs-on: ubuntu-latest | |
| needs: format | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| database: [mongodb, sqlite] | |
| name: test-pages-unlocalized-${{ matrix.database }} | |
| services: | |
| mongodb: | |
| image: ${{ matrix.database == 'mongodb' && 'mongo:7.0' || '' }} | |
| ports: | |
| - 27017:27017 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup environment variables | |
| run: | | |
| echo "PAYLOAD_SECRET=test-secret-not-for-production" > pages/dev_unlocalized/.env | |
| echo "NEXT_PUBLIC_FRONTEND_URL=http://localhost:4321" >> pages/dev_unlocalized/.env | |
| if [ "${{ matrix.database }}" = "mongodb" ]; then | |
| echo "MONGODB_URL=mongodb://localhost:27017/plugin-pages-dev-unlocalized-test" >> pages/dev_unlocalized/.env | |
| else | |
| echo "SQLITE_URL=file:./payload-test.db" >> pages/dev_unlocalized/.env | |
| fi | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install:all | |
| - name: Run tests | |
| run: cd pages && pnpm test:unlocalized:${{ matrix.database }} | |
| env: | |
| PAYLOAD_DATABASE: ${{ matrix.database }} | |
| test-pages-multi-tenant: | |
| runs-on: ubuntu-latest | |
| needs: format | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| database: [mongodb, sqlite] | |
| name: test-pages-multi-tenant-${{ matrix.database }} | |
| services: | |
| mongodb: | |
| image: ${{ matrix.database == 'mongodb' && 'mongo:7.0' || '' }} | |
| ports: | |
| - 27017:27017 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup environment variables | |
| run: | | |
| echo "PAYLOAD_SECRET=test-secret-not-for-production" > pages/dev_multi_tenant/.env | |
| echo "NEXT_PUBLIC_FRONTEND_URL=http://localhost:4321" >> pages/dev_multi_tenant/.env | |
| if [ "${{ matrix.database }}" = "mongodb" ]; then | |
| echo "MONGODB_URL=mongodb://localhost:27017/plugin-pages-dev-multi-tenant-test" >> pages/dev_multi_tenant/.env | |
| else | |
| echo "SQLITE_URL=file:./payload-test.db" >> pages/dev_multi_tenant/.env | |
| fi | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install:all | |
| - name: Run tests | |
| run: cd pages && pnpm test:multi-tenant:${{ matrix.database }} | |
| env: | |
| PAYLOAD_DATABASE: ${{ matrix.database }} |