Skip to content

Appliquer les données de l'open data #959

Appliquer les données de l'open data

Appliquer les données de l'open data #959

Workflow file for this run

name: Intégration continue
on:
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
# release:
# types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
#test-unit:
build-tools:
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Build and push Sqitch
run: earthly --use-inline-cache --save-inline-cache --push +sqitch-builder
- name: Build and push pg_tap
run: earthly --use-inline-cache --save-inline-cache --push +pg-tap-builder
build-business-dev:
# todo: needs: unit-test
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Build and push business deps image
run: earthly --use-inline-cache --save-inline-cache --push +business-build
prepare-front-deps:
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Build and push front deps image
run: earthly --use-inline-cache --save-inline-cache --push +front-deps-builder
build-app-dev:
needs: prepare-front-deps
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Build and push app image
run: earthly --use-inline-cache --save-inline-cache --push +app-build --ANON_KEY=${{ secrets.ANON_KEY }} --API_URL=${{ secrets.API_URL }}
build-auth-dev:
needs: prepare-front-deps
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Build and push auth. image
run: earthly --use-inline-cache --save-inline-cache --push +auth-build --ANON_KEY=${{ secrets.ANON_KEY }} --API_URL=${{ secrets.API_URL }}
build-storybook-dev:
needs: prepare-front-deps
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Build and push storybook image
run: earthly --use-inline-cache --save-inline-cache --push +storybook-build
build-db:
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Prepare faster
run: >
earthly --use-inline-cache +prepare-faster
--stop=no --push=yes
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
test-api:
needs:
- build-business-dev
- build-tools
- build-db
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ 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 API
run: >
earthly --use-inline-cache +api-test --tests 'base droit historique plan_action indicateurs utilisateur emt'
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
test-package-api:
needs:
- build-business-dev
- build-tools
- build-db
- prepare-front-deps
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ 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 }}
test-package-ui:
needs:
- build-storybook-dev
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Start services
run: >
earthly --use-inline-cache +storybook-run
- name: Test package UI
run: >
earthly --use-inline-cache +storybook-test-run
test-business:
needs:
- build-business-dev
- build-tools
- build-db
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Start services
run: >
earthly --use-inline-cache +dev
--stop=no --datalayer=yes --business=no --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 Business
run: >
earthly --use-inline-cache +business-test
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
test-app:
needs: prepare-front-deps
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Test de l'application React
run: >
earthly --use-inline-cache +app-test
test-db-deploy:
needs:
- build-business-dev
- build-tools
- build-db
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Start services
run: >
earthly --use-inline-cache +dev
--stop=no --datalayer=yes --business=no --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: 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 Deploy
run: >
earthly --use-inline-cache +db-deploy-test
--DB_URL=${{ secrets.DB_URL }}
test-db:
needs:
- build-business-dev
- build-tools
- build-db
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Start services
run: >
earthly --use-inline-cache +dev
--stop=no --datalayer=yes --business=no --app=no --eco=no --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: Test Deploy
run: >
earthly --use-inline-cache +db-test
--DB_URL=${{ secrets.DB_URL }}
test-e2e:
needs:
- build-business-dev
- build-tools
- build-app-dev
- build-auth-dev
- build-db
environment: dev
name: End-to-end tests
runs-on: ubuntu-latest
timeout-minutes: 60
env:
e2e-directory: ./e2e
datalayer-directory: ./data_layer
project-docker-directory: ./
CYPRESS_IMAGE: 'cypress/browsers:node-20.6.1-chrome-116.0.5845.187-1-ff-117.0-edge-116.0.1938.76-1'
LANG: 'fr_FR.UTF-8'
REACT_APP_CRISP_WEBSITE_ID: 96fe7866-d005-4623-80b1-bd772e99855c
GIT_HEAD_REF: ${{github.head_ref}}
GIT_SHA: ${{github.sha}}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.0
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
# fixe la langue de l'environnement de test : permet de faire passer les
# tests de composant utilisant des fonctions telles que toLocaleString()
- name: Set locale
run: |
sudo locale-gen ${{env.LANG}}
sudo update-locale LANG=${{env.LANG}}
- name: Start services
run: >
earthly --use-inline-cache +dev
--stop=no --datalayer=yes --business=yes --app=yes --auth=yes --eco=yes --faster=yes --version=HEAD
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--API_URL=${{ secrets.API_URL }}
--ANON_KEY=${{ secrets.ANON_KEY }}
- run: docker restart supabase_rest_tet
# run tests into electron
- name: Cypress run
uses: cypress-io/github-action@v5
with:
working-directory: ${{env.e2e-directory}}
env:
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SUPABASE_URL: ${{ secrets.API_URL }}
SUPABASE_ANON_KEY: ${{ secrets.ANON_KEY }}
SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SERVICE_ROLE_KEY }}
- name: Upload report to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: report-chrome
path: ${{env.e2e-directory}}/cucumber-report.html
- name: Collect docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
with:
dest: './logs'
- name: Tar logs
if: failure()
run: tar cvzf ./logs.tgz ./logs
- name: Upload logs to GitHub
if: failure()
uses: actions/upload-artifact@master
with:
name: logs.tgz
path: ./logs.tgz
test-fonctions:
needs:
- build-business-dev
- build-tools
- build-app-dev
- build-db
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ 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: Api test build
run: >
earthly --use-inline-cache +api-test-build
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
- 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 api crud fonctions
run: >
docker run --rm
--name api_crud_test_tet
--network host
--env SUPABASE_URL=${{ secrets.API_URL }}
--env SUPABASE_KEY=${{ secrets.ANON_KEY }}
api-test:latest test -A tests/crud/crud.test.ts --location 'http://localhost' -- type:fonction
test-vues:
needs:
- build-business-dev
- build-tools
- build-app-dev
- build-db
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ 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: Api test build
run: >
earthly --use-inline-cache +api-test-build
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
- 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 api crud vues
run: >
docker run --rm
--name api_crud_test_tet
--network host
--env SUPABASE_URL=${{ secrets.API_URL }}
--env SUPABASE_KEY=${{ secrets.ANON_KEY }}
api-test:latest test -A tests/crud/crud.test.ts --location 'http://localhost' -- type:vue
test-tables1:
needs:
- build-business-dev
- build-tools
- build-app-dev
- build-db
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ 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: Api test build
run: >
earthly --use-inline-cache +api-test-build
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
- 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 api crud table 1-3
run: >
docker run --rm
--name api_crud_test_tet
--network host
--env SUPABASE_URL=${{ secrets.API_URL }}
--env SUPABASE_KEY=${{ secrets.ANON_KEY }}
api-test:latest test -A tests/crud/crud.test.ts --location 'http://localhost' -- type:table nbPart:3 part:1
test-tables2:
needs:
- build-business-dev
- build-tools
- build-app-dev
- build-db
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ 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: Api test build
run: >
earthly --use-inline-cache +api-test-build
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
- 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 api crud table 2-3
run: >
docker run --rm
--name api_crud_test_tet
--network host
--env SUPABASE_URL=${{ secrets.API_URL }}
--env SUPABASE_KEY=${{ secrets.ANON_KEY }}
api-test:latest test -A tests/crud/crud.test.ts --location 'http://localhost' -- type:table nbPart:3 part:2
test-tables3:
needs:
- build-business-dev
- build-tools
- build-app-dev
- build-db
environment: dev
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- uses: supabase/setup-cli@v1
with:
version: latest
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ 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: Api test build
run: >
earthly --use-inline-cache +api-test-build
--DB_URL=${{ secrets.DB_URL }}
--SERVICE_ROLE_KEY=${{ secrets.SERVICE_ROLE_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }}
--API_URL=${{ secrets.API_URL }}
- 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 api crud table 3-3
run: >
docker run --rm
--name api_crud_test_tet
--network host
--env SUPABASE_URL=${{ secrets.API_URL }}
--env SUPABASE_KEY=${{ secrets.ANON_KEY }}
api-test:latest test -A tests/crud/crud.test.ts --location 'http://localhost' -- type:table nbPart:3 part:3