Added a new job to check for changed files before executing the CI workflow. Integrated Tinybird local service, updated environment variables, and refined the CI steps for better functionality and clarity.
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: CI Tinybird
|
|
on:
|
|
push:
|
|
branches:
|
|
- feature/reimplement-tinybird
|
|
- main
|
|
paths:
|
|
- 'package.json'
|
|
- 'packages/twenty-tinybird/**'
|
|
|
|
pull_request:
|
|
paths:
|
|
- 'package.json'
|
|
- 'packages/twenty-tinybird/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
TINYBIRD_HOST: https://api.eu-central-1.aws.tinybird.co
|
|
TINYBIRD_TOKEN: ${{ secrets.TB_ADMIN_TOKEN }}
|
|
|
|
jobs:
|
|
changed-files-check:
|
|
uses: ./.github/workflows/changed-files.yaml
|
|
with:
|
|
files: packages/twenty-tinybird/**
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
needs: changed-files-check
|
|
if: needs.changed-files-check.outputs.any_changed == 'true'
|
|
timeout-minutes: 10
|
|
defaults:
|
|
run:
|
|
working-directory: './packages/twenty-tinybird'
|
|
services:
|
|
tinybird:
|
|
image: tinybirdco/tinybird-local:beta
|
|
ports:
|
|
- 7181:7181
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
with:
|
|
fetch-depth: 1
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Install Tinybird CLI
|
|
run: curl https://tinybird.co | sh
|
|
- name: Build project
|
|
run: tb build
|
|
- name: Test project
|
|
run: tb test run
|
|
|