mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-29 10:13:05 +03:00
ccd02fe58c
Job testing if docker compose is working. It triggers on pull_requests.
73 lines
2.3 KiB
YAML
73 lines
2.3 KiB
YAML
name: CI Chrome Extension
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'package.json'
|
|
- 'packages/twenty-chrome-extension/**'
|
|
pull_request:
|
|
paths:
|
|
- 'package.json'
|
|
- 'packages/twenty-chrome-extension/**'
|
|
jobs:
|
|
chrome-extension-yarn-install:
|
|
runs-on: ci-8-cores
|
|
env:
|
|
VITE_SERVER_BASE_URL: http://localhost:3000
|
|
VITE_FRONT_BASE_URL: http://localhost:3001
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.11.0
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "18"
|
|
- name: Cache chrome extension node modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: packages/twenty-chrome-extension/node_modules
|
|
key: chrome-extension-node_modules-${{hashFiles('yarn.lock')}}
|
|
restore-keys: chrome-extension-node_modules-
|
|
- name: Cache root node modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: node_modules
|
|
key: root-node_modules-${{hashFiles('yarn.lock')}}
|
|
restore-keys: root-node_modules-
|
|
- name: Chrome Extension / Install Dependencies
|
|
run: yarn
|
|
chrome-extension-build:
|
|
needs: chrome-extension-yarn-install
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
VITE_SERVER_BASE_URL: http://localhost:3000
|
|
VITE_FRONT_BASE_URL: http://localhost:3001
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.11.0
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "18"
|
|
- name: Cache chrome extension node modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: packages/twenty-chrome-extension/node_modules
|
|
key: chrome-extension-node_modules-${{hashFiles('yarn.lock')}}
|
|
restore-keys: chrome-extension-node_modules-
|
|
- name: Cache root node modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: node_modules
|
|
key: root-node_modules-${{hashFiles('yarn.lock')}}
|
|
restore-keys: root-node_modules-
|
|
- name: Chrome Extension / Run build
|
|
run: yarn nx build twenty-chrome-extension
|