2024-02-12 14:30:23 +03:00
|
|
|
name: CI Chrome Extension
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-04-03 19:08:21 +03:00
|
|
|
paths:
|
|
|
|
- 'package.json'
|
|
|
|
- 'packages/twenty-chrome-extension/**'
|
2024-02-12 14:30:23 +03:00
|
|
|
pull_request:
|
2024-04-03 19:08:21 +03:00
|
|
|
paths:
|
|
|
|
- 'package.json'
|
|
|
|
- 'packages/twenty-chrome-extension/**'
|
2024-04-04 10:30:55 +03:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2024-02-12 14:30:23 +03:00
|
|
|
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:
|
|
|
|
- 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
|
2024-04-19 19:28:02 +03:00
|
|
|
run: npx nx build twenty-chrome-extension
|