Skip to content

feat: Add devcontainer scripts on create and post start #15

feat: Add devcontainer scripts on create and post start

feat: Add devcontainer scripts on create and post start #15

# Copyright (c) 2023-2024 Contributors to the Eclipse Foundation
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: Project creation
concurrency:
group: ${{ github.ref }}-project-creation
cancel-in-progress: true
on:
workflow_dispatch:
push:
# Run only on branches/commits and not tags
branches:
- main
pull_request:
branches:
- main
jobs:
check-project-creation:
name: Check project creation
runs-on: ubuntu-22.04
strategy:
matrix:
example: ["no-example", "horn-activator"]
fail-fast: false
steps:
- name: Checkout core repo
uses: actions/checkout@v4
- name: Create project
shell: bash
run: |
git config --global user.name "Git User"
git config --global user.email "[email protected]"
CREATE_ARGS="-n MyApp"
if [ "${{ matrix.example }}" != "no-example" ]; then
CREATE_ARGS="-e ${{ matrix.example }}"
fi
python3 ./components/cores/uapp-java/.project-creation/run.py -d "./app" $CREATE_ARGS
- name: Install dependencies
shell: bash
run: |
pip install -r ./components/cores/uapp-java/.project-creation/test/requirements.txt
- name: Run verification on generated project
shell: bash
run: |
export VELOCITAS_APP_ROOT=./app
# debug print contents
ls -al $VELOCITAS_APP_ROOT
pytest --ignore-glob=**/.devcontainer/* --ignore-glob=**/.skeleton/* ./components/cores/uapp-java/.project-creation
- name: Upload logs
uses: actions/upload-artifact@v3
if: always()
with:
name: logs_${{ matrix.example }}
path: ./app/logs
retention-days: 1