Skip to content

Fix/tests packages api #1

Fix/tests packages api

Fix/tests packages api #1

Workflow file for this run

name: CI - package api
on:
pull_request:
branches: [main]
paths:
- 'packages/api/**'
workflow_dispatch:
permissions:
actions: read
contents: read
jobs:
test-package-api:
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v4
- uses: earthly/actions-setup@v1
with:
github-token: ${{ secrets.GH_TOKEN }}
version: ^0.8.0
- uses: supabase/setup-cli@v1
- name: Login into registry
run: docker login ghcr.io/territoiresentransitions --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}"
- name: Start services
run: >
earthly --use-inline-cache +dev
--stop=no --datalayer=yes --business=yes --app=no --eco=yes --faster=yes --version=HEAD
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
- name: Reset de postgrest
run: docker restart supabase_rest_tet
- name: Test curl
run: >
earthly --use-inline-cache +curl-test
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
- name: Test package API
run: >
earthly --use-inline-cache +package-api-test
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}