Skip to content

vintner utils scenario, simplify rules type #1557

vintner utils scenario, simplify rules type

vintner utils scenario, simplify rules type #1557

Workflow file for this run

name: Tests
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
tests:
name: Tests
runs-on: ubuntu-22.04
steps:
###################################################
#
# Prepare
#
###################################################
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
- name: (PREPARE) Free space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache
- name: (PREPARE) Set up QEMU
uses: docker/setup-qemu-action@v2
- name: (PREPARE) Checkout Repository
uses: actions/checkout@v3
with:
lfs: true
- name: (PREPARE) Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.15.0
cache: yarn
- name: (PREPARE) Install Node Modules
run: ./task install
- name: (PREPARE) Build Tasks
run: ./task tasks:build
- name: (PREPARE) Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.10.13
cache: pip
- name: (PREPARE) Cache xOpera
uses: actions/cache@v3
with:
path: /home/runner/opera
key: xopera
- name: (PREPARE) Install xOpera
run: ./src/assets/scripts/install-xopera.sh
- name: (PREPARE) Build Project
run: ./task build
- name: (PREPARE) Pull Example Dependencies
run: ./task examples:pull
###################################################
#
# Test
#
###################################################
- name: (TEST) Check ESLint
run: ./task lint:check
- name: (TEST) Check Prettier
run: ./task style:check
- name: (TEST) Check Dependencies
run: ./task licenses:check
- name: (TEST) Check Service Templates
run: ./task puccini:check
- name: (TEST) Run Tests
run: ./task test
###################################################
#
# Package
#
###################################################
- name: (PACKAGE) Setup Packaging Cache
uses: actions/cache@v3
with:
path: ~/.pkg-cache
key: pkg
- name: (PACKAGE) Package Binaries
run: ./task package
- name: (PACKAGE) Compress Examples
run: tar -czvf ./dist/examples.tar.gz -C examples .
###################################################
#
# Docker
#
###################################################
- name: (DOCKER) Set up Docker Buildx
uses: docker/[email protected]
- name: (DOCKER) Log in to the container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: (DOCKER) Build Docker image
uses: docker/[email protected]
with:
context: .
file: docker/Dockerfile
tags: ghcr.io/opentosca/opentosca-vintner:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/opentosca/opentosca-vintner:buildcache
cache-to: type=registry,ref=ghcr.io/opentosca/opentosca-vintner:buildcache,mode=max
###################################################
#
# Docs
#
###################################################
- name: (DOCS) Install Dependencies
run: ./task docs:install
- name: (DOCS) Generate Dependencies Page
run: ./task docs:generate:dependencies
- name: (DOCS) Generate Interface Page
run: ./task docs:generate:interface
- name: (DOCS) Generate Variability4TOSCA Conformance Test Pages
run: ./task docs:generate:variability
- name: (DOCS) Generate Queries4TOSCA Conformance Test Pages
run: ./task docs:generate:query
- name: (DOCS) Generate TOSCA SofDCar Profile Page
run: ./task docs:generate:sofdcar
- name: (DOCS) Build Docs
run: ./task docs:build