Add cache-warmer and matrix test runs (expecting windows to fail) #98
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: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- "*" # matches every branch that doesn't contain a '/' | |
- "*/*" # matches every branch containing a single '/' | |
- "**" # matches every branch | |
# - "!main" # excludes master | |
- "!release/production" # excludes master | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
cache-warmer: | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
bun-version: [1.0.20, 1.0.19] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- run: bun install | |
# This workflow contains a single job called "build" | |
test: | |
needs: cache-warmer | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
bun-version: [1.0.20, 1.0.19] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
env: | |
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }} | |
PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }} | |
# 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@v3 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- 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: | |
needs: cache-warmer | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
bun-version: [1.0.20, 1.0.19] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
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@v3 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- run: bun install | |
- uses: supabase/setup-cli@v1 | |
- run: supabase start | |
working-directory: ./packages/supabase/supabase-app | |
- name: Test | |
run: bun run codegen && bun test | |
working-directory: ./packages/supabase | |
typecheck: | |
needs: cache-warmer | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
bun-version: [1.0.20, 1.0.19] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
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@v3 | |
id: checkout | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- run: bun install | |
- name: Typecheck | |
run: bun run typecheck | |
lint: | |
needs: cache-warmer | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
bun-version: [1.0.20, 1.0.19] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
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@v3 | |
id: checkout | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- run: bun install | |
- name: Lint | |
run: bun run lint | |
codegen: | |
needs: cache-warmer | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
bun-version: [1.0.20, 1.0.19] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
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@v3 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- run: bun install | |
- run: bun run graphql-codegen |