Fix script path and runtime #492
This file contains 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
# This is a basic workflow to help you get started with Actions | |
name: Test | |
on: | |
workflow_call: | |
secrets: | |
TEST_PRIVATE_KEY: | |
required: true | |
TEST_PUBLIC_KEY: | |
required: true | |
inputs: | |
bun-version: | |
description: 'Bun Version' | |
required: false | |
type: string | |
os: | |
description: 'Operating System' | |
required: false | |
type: string | |
mongo-version: | |
description: 'MongoDB Version' | |
required: false | |
type: string | |
workflow_dispatch: | |
inputs: | |
bun-version: | |
description: 'Bun Version' | |
required: false | |
default: 'latest' | |
type: string | |
os: | |
description: 'Operating System' | |
required: false | |
options: | |
- 'ubuntu-latest' | |
- 'macos-latest' | |
- 'windows-latest' | |
default: 'ubuntu-latest' | |
type: choice | |
mongo-version: | |
description: 'MongoDB Version' | |
required: false | |
default: '7.0.4' | |
type: string | |
push: | |
branches: | |
- "*" # matches every branch that doesn't contain a '/' | |
- "*/*" # matches every branch containing a single '/' | |
- "**" # matches every branch | |
# - "!main" # matches every branch except main | |
env: | |
MONGOMS_VERSION: ${{ inputs.mongo-version || '7.0.4' }} | |
RUNS_ON: ${{ inputs.os || 'ubuntu-latest' }} | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
test: | |
# The type of runner that the job will run on | |
runs-on: ${{ inputs.os || 'ubuntu-latest' }} | |
timeout-minutes: 10 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: .env.github | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: ${{ inputs.bun-version || env.BUN_VERSION }} | |
- uses: actions/cache@v4 | |
id: cache-mongodb-binaries | |
name: Cache MongoDB binaries | |
with: | |
key: ${{ runner.os }}-mongodb-${{ inputs.bun-version || env.BUN_VERSION }}-${{ env.MONGOMS_VERSION }} | |
path: ~/.cache/mongodb-binaries | |
- run: bun install | |
- name: Test | |
run: bun run test-recursive | |
env: | |
PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} | |
PUBLIC_KEY: ${{ secrets.TEST_PUBLIC_KEY }} | |
test-supabase: | |
# The type of runner that the job will run on | |
runs-on: ${{ inputs.os || 'ubuntu-latest' }} | |
env: | |
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | |
PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }} | |
timeout-minutes: 10 | |
# disable for now - since it for some reason fails on CI | |
if: false | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: .env.github | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: ${{ inputs.bun-version || env.BUN_VERSION }} | |
- uses: actions/cache@v4 | |
id: cache-mongodb-binaries | |
name: Cache MongoDB binaries | |
with: | |
key: ${{ runner.os }}-mongodb-${{ inputs.bun-version || env.BUN_VERSION }}-${{ env.MONGOMS_VERSION }} | |
path: ~/.cache/mongodb-binaries | |
- run: bun install | |
- uses: supabase/setup-cli@v1 | |
- run: supabase start | |
working-directory: ./packages/supabase/supabase-app | |
- name: Test | |
run: bun test | |
working-directory: ./packages/supabase | |
typecheck: | |
runs-on: ${{ inputs.os || 'ubuntu-latest' }} | |
timeout-minutes: 10 | |
env: | |
MONGOMS_DISABLE_POSTINSTALL: true | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
id: checkout | |
- uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: .env.github | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: ${{ inputs.bun-version || env.BUN_VERSION }} | |
- run: bun install --ignore-scripts | |
- name: Typecheck | |
run: bun run typecheck | |
lint: | |
# The type of runner that the job will run on | |
runs-on: ${{ inputs.os || 'ubuntu-latest' }} | |
timeout-minutes: 10 | |
env: | |
MONGOMS_DISABLE_POSTINSTALL: true | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
id: checkout | |
- uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: .env.github | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: ${{ inputs.bun-version || env.BUN_VERSION }} | |
- run: bun install --ignore-scripts | |
- name: Lint | |
run: bun run lint --quiet | |
codegen: | |
# The type of runner that the job will run on | |
runs-on: ${{ inputs.os || 'ubuntu-latest' }} | |
timeout-minutes: 10 | |
env: | |
MONGOMS_DISABLE_POSTINSTALL: true | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: .env.github | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: ${{ inputs.bun-version || env.BUN_VERSION }} | |
- run: bun install --ignore-scripts | |
- run: bun run codegen |