Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: backend build action #2673

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions .github/workflows/backend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,32 @@ jobs:
distribution: "temurin"
java-version: "17"
cache: maven

- name: Cache Maven packages
uses: actions/cache@v4

- uses: stCarolas/setup-maven@v5
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
maven-version: 3.9.0

- name: Give permissions
run: |
sudo chmod 777 ../
shell: bash

- name: Run build script
run: sudo ./build-backend.sh
run: ./build-backend.sh
shell: bash
working-directory: ./deploy

# - name: Cache Maven packages
# uses: actions/cache@v4
# with:
# path: ~/.m2
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
# restore-keys: |
# ${{ runner.os }}-maven-

- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: backend-build-artifacts
path: deploy/cloudbeaver
if-no-files-found: error
9 changes: 5 additions & 4 deletions .github/workflows/frontend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: "20"

Expand Down Expand Up @@ -60,19 +60,19 @@ jobs:
${{ runner.os }}-dist-

- name: yarn install
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp
cmd: install

- name: yarn lerna bootstrap
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp
cmd: lerna bootstrap

- name: build
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp/packages/product-default
cmd: bundle
Expand All @@ -82,3 +82,4 @@ jobs:
with:
name: frontend-build-artifacts
path: webapp/packages/product-default/lib
if-no-files-found: error
18 changes: 9 additions & 9 deletions .github/workflows/frontend-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
working-directory: ./webapp

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "18"

Expand All @@ -28,49 +28,49 @@ jobs:
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: restore yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: restore node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-

- name: restore typescript cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/packages/*/dist"
key: ${{ runner.os }}-dist-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-dist-

- name: yarn install
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp
cmd: install

- name: yarn lerna bootstrap
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp
cmd: lerna bootstrap

- name: build
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp/packages/product-default
cmd: build # build tyescript source code

- name: test
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp
cmd: lerna run test # build packages that have test script
18 changes: 9 additions & 9 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
working-directory: ./webapp

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "20"

Expand All @@ -32,49 +32,49 @@ jobs:
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: restore yarn cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: restore node_modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-

- name: restore typescript cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: "**/packages/*/dist"
key: ${{ runner.os }}-dist-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-dist-

- name: yarn install
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp
cmd: install

- name: yarn lerna bootstrap
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp
cmd: lerna bootstrap

- name: build
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp/packages/product-default
cmd: bundle

- name: test
uses: borales/actions-yarn@v4
uses: borales/actions-yarn@v5
with:
dir: webapp
cmd: lerna run test
Loading