mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-16 14:50:15 +08:00
* fix: try to fix make docker container.sh * fix: specify correct docker build scripts folder * fix: validate branch to valid docker tag name * feat: combined workflows * feat: add readable names for github actions * feat: add docker pull command comment * fix: comment publishing comment with docker instructions * feat: improve build & test performance * feat: add option to skip cache * fix: flush cache * fix: flush cache * feat: merge tests and build steps * fix: github action outputs keys * feat: add lint job * feat: change file to trigger lint * fix: omit webapp path * fix: trigger lint * fix: continue on linting errors * feat: add publishing container to github docker registry * feat: add lint status * chore: re-trigger-lint * feat: add java checkstyle * fix: java linting * fix: github token * fix: update jave checkstyle action * chore: simplify frontend lint action * chore: remove changed java files * feat: revert lint trigger frontend * feat: add docker credentials helper * fix: remove credentials warning * fix: tests and clean command * CB-5228 feat: run frontend tests for every build * fix: clean tasks * feat: update cli tools
92 lines
2.2 KiB
YAML
92 lines
2.2 KiB
YAML
name: Frontend Build
|
|
|
|
on:
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
# Allows you to reuse workflows by referencing their YAML files
|
|
workflow_call:
|
|
outputs:
|
|
build-status:
|
|
description: "Build status"
|
|
value: ${{ jobs.frontend-build.outputs.build-status }}
|
|
test-status:
|
|
description: "Test status"
|
|
value: ${{ jobs.frontend-build.outputs.test-status }}
|
|
inputs:
|
|
skip_cache:
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
frontend-build:
|
|
name: Frontend
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
build-status: ${{ steps.build.outcome }}
|
|
test-status: ${{ steps.test.outcome }}
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: ./webapp
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: yarn
|
|
cache-dependency-path: webapp/yarn.lock
|
|
|
|
- name: restore node_modules
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: "**/node_modules"
|
|
key: ${{ runner.os }}-node_modules-${{ hashFiles('webapp/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-node_modules-
|
|
|
|
- name: restore typescript cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: "**/packages/*/dist"
|
|
key: ${{ runner.os }}-dist-${{ hashFiles('webapp/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-dist-
|
|
|
|
- name: yarn clean
|
|
if: env.skip_cache == 'true'
|
|
uses: borales/actions-yarn@v5
|
|
with:
|
|
dir: webapp
|
|
cmd: clean
|
|
|
|
- name: yarn install --frozen-lockfile
|
|
uses: borales/actions-yarn@v5
|
|
with:
|
|
dir: webapp
|
|
cmd: install
|
|
|
|
- name: build
|
|
id: build
|
|
uses: borales/actions-yarn@v5
|
|
with:
|
|
dir: webapp/packages/product-default
|
|
cmd: bundle
|
|
|
|
- name: test
|
|
id: test
|
|
uses: borales/actions-yarn@v5
|
|
with:
|
|
dir: webapp
|
|
cmd: test
|
|
|
|
- name: Archive build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: frontend-build-artifacts
|
|
path: webapp/packages/product-default/lib
|
|
if-no-files-found: error
|