Migrate attachments to morph relations + fix morph join column filtering #22610
This file contains hidden or 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
| name: CI Emails | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| changed-files-check: | |
| uses: ./.github/workflows/changed-files.yaml | |
| with: | |
| files: | | |
| package.json | |
| packages/twenty-emails/** | |
| emails-test: | |
| needs: changed-files-check | |
| if: needs.changed-files-check.outputs.any_changed == 'true' | |
| timeout-minutes: 10 | |
| runs-on: depot-ubuntu-24.04-8 | |
| steps: | |
| - name: Fetch custom Github Actions and base branch history | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install dependencies | |
| uses: ./.github/actions/yarn-install | |
| - name: Build twenty-emails | |
| run: npx nx build twenty-emails | |
| - name: Run email tests | |
| run: | | |
| # Start the email server in the background | |
| npx nx run twenty-emails:start & | |
| SERVER_PID=$! | |
| # Wait for server to start | |
| sleep 20 | |
| # Check if server is running | |
| if ! curl -s http://localhost:4001/preview/test.email > /dev/null; then | |
| echo "Email server failed to start" | |
| kill $SERVER_PID | |
| exit 1 | |
| fi | |
| # Kill the server | |
| kill $SERVER_PID | |
| ci-emails-status-check: | |
| if: always() && !cancelled() | |
| timeout-minutes: 5 | |
| runs-on: ubuntu-latest | |
| needs: [changed-files-check, emails-test] | |
| steps: | |
| - name: Fail job if any needs failed | |
| if: contains(needs.*.result, 'failure') | |
| run: exit 1 |