Skip to content

feat: automated qa - unit test setup (#734) #90

feat: automated qa - unit test setup (#734)

feat: automated qa - unit test setup (#734) #90

Workflow file for this run

name: Build and Test
on:
push:
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18.16.0"
- name: Install
run: yarn install
- name: Local Build
run: yarn build
# Enable `test` step once writing unit test done.
# - name: Test
# run: yarn test
- name: Lint
run: yarn lint
run-migration:
runs-on: ubuntu-latest
needs: build

Check failure on line 33 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build and Test

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 33, Col: 12): Job 'run-migration' depends on unknown job 'build'.
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development')
env:
SUPABASE_ACCESS_TOKEN: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_ACCESS_TOKEN || secrets.STAGING_SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_DB_PASSWORD || secrets.STAGING_SUPABASE_DB_PASSWORD }}
PROJECT_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_PROJECT_ID || secrets.STAGING_SUPABASE_PROJECT_ID }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Link Supabase project
run: supabase link --project-ref $PROJECT_ID
- name: Run migrations
run: supabase db push