Merge pull request #946 from gisaia/feature/refactorBuild #1313
This file contains 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: Lint / Build | |
on: push | |
jobs: | |
build: | |
name: Lint, Test, Build & Docker build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.1.4 | |
- name: Use Node 18 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Cache node modules | |
id: cache-nodemodules | |
uses: actions/cache@v4.0.2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: License check | |
run: npm run license-check | |
- name: Test | |
run: npm run test | |
- name: Build lib | |
run: | | |
export NODE_OPTIONS=--max_old_space_size=8192; | |
npm install --workspaces=false --include-workspace-root=true | |
npm run build-lib | |
- name: Build cloud | |
run: | | |
export NODE_OPTIONS=--max_old_space_size=8192; | |
npm install --workspace=packages/cloud --include-workspace-root=true | |
npm rebuild node-sass | |
npm run build-cloud | |
- name: Build open source | |
run: | | |
export NODE_OPTIONS=--max_old_space_size=8192; | |
npm install --workspace=packages/opensource --include-workspace-root=true | |
npm rebuild node-sass | |
npm run build-opensource | |
- name: Docker build | |
run: | | |
export NODE_OPTIONS=--max_old_space_size=8192; | |
docker build -f docker/Dockerfile --build-arg WORKSPACE=cloud .; | |
docker build -f docker/Dockerfile --build-arg WORKSPACE=opensource . | |
#- name: i18n | |
# run: ./checki18n.sh |