Skip to content

Commit

Permalink
fix: PR workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Orel <[email protected]>
  • Loading branch information
olexii4 committed Sep 17, 2024
1 parent e1fe428 commit 15463a8
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 1,380 deletions.
Empty file modified .deps/dev.md
100644 → 100755
Empty file.
Empty file modified .deps/prod.md
100644 → 100755
Empty file.
64 changes: 61 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,33 @@ jobs:
node-version: 18
-
name: "Install dependencies"
run: yarn
run: yarn install
-
name: "Check dependencies usage restrictions"
run: yarn license:check

dash-licenses-yarn-v1:
runs-on: ubuntu-22.04
if: ${{ github.base_ref == 'main' }}
steps:
-
name: "Checkout Che Dashboard source code"
uses: actions/checkout@v4
-
name: "Use Node 20"
uses: actions/setup-node@v4
with:
node-version: 20
-
name: "Switch to Yarn 1"
run: scripts/yarn/change_package_manager.sh
-
name: "Install dependencies"
run: yarn install
-
name: "Check dependencies usage restrictions"
run: podman run --rm -t -v ./:/workspace/project quay.io/che-incubator/dash-licenses:next --check

time-check:
runs-on: ubuntu-22.04
strategy:
Expand All @@ -56,7 +78,7 @@ jobs:
node-version: ${{ matrix.node-version }}
-
name: "Install dependencies"
run: yarn
run: yarn install
-
name: "Workspace creation time check"
run: yarn test:check
Expand All @@ -77,7 +99,7 @@ jobs:
node-version: ${{ matrix.node-version }}
-
name: "Install dependencies"
run: yarn
run: yarn install
-
name: "Build"
run: yarn build
Expand All @@ -88,6 +110,42 @@ jobs:
name: "Run unit tests"
run: yarn test

build-and-test-yarn-v1:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20.x]
steps:
-
name: "Checkout Che Dashboard source code"
uses: actions/checkout@v4
-
name: "Use Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
-
name: "Switch to Yarn 1"
run: scripts/yarn/change_package_manager.sh
-
name: "Install dependencies"
run: yarn install
-
name: "Build common"
run: yarn --cwd packages/common build
-
name: "Build frontend"
run: yarn --cwd packages/dashboard-frontend build
-
name: "Test frontend"
run: yarn --cwd packages/dashboard-frontend test
-
name: "Build backend"
run: yarn --cwd packages/dashboard-backend build
-
name: "Test backend"
run: yarn --cwd packages/dashboard-backend test

docker-build:
needs: build-and-test
runs-on: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"scripts": {
"build": "yarn prebuild && lerna run build --scope=@eclipse-che/dashboard-\\* --concurrency 1",
"build:dev": "yarn prebuild && lerna run build:dev --scope=@eclipse-che/dashboard-\\*",
"prebuild": "lerna run build --scope=@eclipse-che/common",
"prebuild": "yarn workspace @eclipse-che/common build",
"prebuild:dev": "yarn prebuild",
"frontend:start": "yarn workspace @eclipse-che/dashboard-frontend start",
"start": "${PWD}/run/local-run.sh $@",
Expand Down
5 changes: 0 additions & 5 deletions scripts/yarn/change_package_manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ if [ -f "$(pwd)/yarn.lock" ]; then
echo "[INFO]: Move 'yarn.lock' file to the temporary directory"
mv -f $(pwd)/yarn.lock $TMP_DIR
fi

if [ -d "$(pwd)/.deps" ]; then
echo "[INFO]: Move '.deps' dir to the temporary directory"
mv -f $(pwd)/.deps $TMP_DIR/
fi
#==========================Restore old version=================================
if [ -d $OLD_VERSION_DIR ]; then
echo "[INFO]: Restore old package manager version"
Expand Down
17 changes: 0 additions & 17 deletions scripts/yarn/old_version/.deps/EXCLUDED/dev.md

This file was deleted.

13 changes: 0 additions & 13 deletions scripts/yarn/old_version/.deps/EXCLUDED/prod.md

This file was deleted.

Loading

0 comments on commit 15463a8

Please sign in to comment.