Skip to content

Commit

Permalink
ci(codesanbox): disable test (#4774)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 authored Apr 4, 2024
1 parent 25f72fc commit 49bc64b
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 62 deletions.
3 changes: 3 additions & 0 deletions .github/scripts/check-folders.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ async function main() {
'package.json', // package.json at root
'generic/basic', // generic/basic doesn't use Github action matrix feature which we parse to find out the differences
'generic/basic-m1', // generic/basic-m1 doesn't use Github action matrix feature which we parse to find out the differences
// Disabled for now, as it's failing with
// Our Container Sandbox (SSE) experience has been replaced with Devboxes (https://codesandbox.io/docs/learn/devboxes/overview)
'platforms/codesandbox',
'platforms-serverless-vercel/vercel-with-redwood/api', // Redwood uses workspaces but is included
'platforms-serverless-vercel/vercel-with-redwood/web', // Redwood uses workspaces but is included
'platforms-serverless/firebase-functions/functions', // Firebase root doesn't have package.json but is included
Expand Down
116 changes: 58 additions & 58 deletions .github/workflows/optional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,61 +148,61 @@ jobs:
if: failure()
run: bash .github/slack/notify-failure.sh ${{ github.job }} ${{ matrix.generator }}

platforms-codesandbox:
needs: [detect_jobs_to_run]
if: contains(fromJSON(needs.detect_jobs_to_run.outputs.jobs), 'platforms')

timeout-minutes: 45
strategy:
fail-fast: false
matrix:
platform:
- codesandbox
clientEngine: ['library', 'binary']
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
concurrency: ${{ github.job }}-${{ matrix.platform }}-${{ matrix.clientEngine }}

steps:
- uses: actions/checkout@v4

- uses: pnpm/[email protected]
with:
version: 8

- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
cache-dependency-path: platforms/${{ matrix.platform }}/package-lock.json

- name: Define Client Engine Type to test
run: echo "PRISMA_CLIENT_ENGINE_TYPE=${{ matrix.clientEngine }}" >> $GITHUB_ENV

- name: Install Dependencies
run: npm install

- name: Install Puppeteer
uses: ianwalter/[email protected]

- name: Set test specific DATABASE_URL
run: |
string=${{ env.DATABASE_URL_POSTGRES_TEMPLATE }}
search=database
replace=${{ github.job }}_${{ matrix.platform }}_${{ matrix.os }}_${{ matrix.clientEngine }}
replaced=${string/$search/$replace}
echo "DATABASE_URL=$replaced" >> $GITHUB_ENV
env:
DATABASE_URL_POSTGRES_TEMPLATE: ${{ secrets.DATABASE_URL_POSTGRES_TEMPLATE }}

- name: test ${{ matrix.platform }} - ${{ matrix.clientEngine }}
id: run-test
uses: nick-invision/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: bash .github/scripts/test-project.sh ${{ github.job }} ${{ matrix.platform }}

- name: notify-slack
if: failure()
run: bash .github/slack/notify-failure.sh ${{ github.job }} ${{ matrix.platform }}
# platforms-codesandbox:
# needs: [detect_jobs_to_run]
# if: contains(fromJSON(needs.detect_jobs_to_run.outputs.jobs), 'platforms')

# timeout-minutes: 45
# strategy:
# fail-fast: false
# matrix:
# platform:
# - codesandbox
# clientEngine: ['library', 'binary']
# os: [ubuntu-22.04]
# runs-on: ${{ matrix.os }}
# concurrency: ${{ github.job }}-${{ matrix.platform }}-${{ matrix.clientEngine }}

# steps:
# - uses: actions/checkout@v4

# - uses: pnpm/[email protected]
# with:
# version: 8

# - uses: actions/setup-node@v4
# with:
# node-version: 16
# cache: 'npm'
# cache-dependency-path: platforms/${{ matrix.platform }}/package-lock.json

# - name: Define Client Engine Type to test
# run: echo "PRISMA_CLIENT_ENGINE_TYPE=${{ matrix.clientEngine }}" >> $GITHUB_ENV

# - name: Install Dependencies
# run: npm install

# - name: Install Puppeteer
# uses: ianwalter/[email protected]

# - name: Set test specific DATABASE_URL
# run: |
# string=${{ env.DATABASE_URL_POSTGRES_TEMPLATE }}
# search=database
# replace=${{ github.job }}_${{ matrix.platform }}_${{ matrix.os }}_${{ matrix.clientEngine }}
# replaced=${string/$search/$replace}
# echo "DATABASE_URL=$replaced" >> $GITHUB_ENV
# env:
# DATABASE_URL_POSTGRES_TEMPLATE: ${{ secrets.DATABASE_URL_POSTGRES_TEMPLATE }}

# - name: test ${{ matrix.platform }} - ${{ matrix.clientEngine }}
# id: run-test
# uses: nick-invision/retry@v3
# with:
# timeout_minutes: 45
# max_attempts: 3
# command: bash .github/scripts/test-project.sh ${{ github.job }} ${{ matrix.platform }}

# - name: notify-slack
# if: failure()
# run: bash .github/slack/notify-failure.sh ${{ github.job }} ${{ matrix.platform }}
4 changes: 0 additions & 4 deletions .github/workflows/scripts/detect-jobs-to-run.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ describe('detect-jobs-to-run', () => {
"databases-macos",
"test-runners",
"community-generators",
"platforms-codesandbox",
]
`)
})
Expand Down Expand Up @@ -121,7 +120,6 @@ describe('detect-jobs-to-run', () => {
"databases-macos",
"test-runners",
"community-generators",
"platforms-codesandbox",
]
`)
expect(jobsToRun.includes('platforms')).toBe(true)
Expand Down Expand Up @@ -158,7 +156,6 @@ describe('detect-jobs-to-run', () => {
"databases-macos",
"test-runners",
"community-generators",
"platforms-codesandbox",
]
`)
expect(jobsToRun.includes('platforms')).toBe(true)
Expand Down Expand Up @@ -195,7 +192,6 @@ describe('detect-jobs-to-run', () => {
"databases-macos",
"test-runners",
"community-generators",
"platforms-codesandbox",
]
`)
expect(jobsToRun.includes('platforms')).toBe(true)
Expand Down

0 comments on commit 49bc64b

Please sign in to comment.