Skip to content

feat: add smoke tests #7466

feat: add smoke tests

feat: add smoke tests #7466

#
# Copyright (c) 2020-2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
name: Image Build PR check
on: [push, pull_request]
jobs:
image-build:
runs-on: ubuntu-22.04
steps:
- name: Clone source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Cache yarn dependencies
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: image-build
run: |
export SKIP_FORMAT=true
export SKIP_LINT=true
export SKIP_TEST=true
docker pull quay.io/eclipse/che-plugin-registry:next
BUILDER=docker ./build.sh --tag pr-check
EXPORTED_FOLDER=/var/www/html/v3
ls -la output/
docker run --rm --entrypoint=sh quay.io/eclipse/che-plugin-registry:pr-check -c "ls -la ${EXPORTED_FOLDER}"
docker create --name pluginRegistry quay.io/eclipse/che-plugin-registry:pr-check sh
mkdir root-dir
docker cp pluginRegistry:${EXPORTED_FOLDER} root-dir/v3
docker rm -f pluginRegistry
cp root-dir/v3/plugins/index.json root-dir/index.json
tar zcvf content.tgz -C root-dir .
- uses: actions/upload-artifact@v3
with:
name: plugin-registry-content
path: content.tgz
pull-request-info:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-22.04
needs: [image-build]
steps:
- name: Store PR info
run: |
echo "${{ github.event.number }}" > PR_NUMBER
echo "${{ github.event.pull_request.head.sha }}" > PR_SHA
- uses: actions/upload-artifact@v3
with:
name: pull-request-number
path: PR_NUMBER
- uses: actions/upload-artifact@v3
with:
name: pull-request-sha
path: PR_SHA