-
Notifications
You must be signed in to change notification settings - Fork 1
125 lines (96 loc) · 3.65 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Tests
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
tests:
name: Tests
runs-on: ubuntu-22.04
steps:
###################################################
#
# Prepare
#
###################################################
- 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: 16
cache: yarn
- name: (PREPARE) Install Node Modules
run: rm -rf node_modules && yarn --frozen-lockfile
- name: (PREPARE) Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
cache: pip
- name: (PREPARE) Install xOpera
run: pip install opera==0.6.9
###################################################
#
# Test
#
###################################################
- name: (TEST) Check ESLint
run: yarn lint:check
- name: (TEST) Check Prettier
run: yarn style:check
- name: (TEST) Check Licenses
run: yarn licenses:check
- name: (TEST) Check Service Templates
run: yarn puccini:check
- name: (TEST) Run Tests
run: yarn test
# TODO: move this to release only
- name: (TEST) Upload Tests to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info
###################################################
#
# Build
#
###################################################
- name: (BUILD) Build Project
run: yarn build
- name: (BUILD) Set Version
run: sed -i "s/__VERSION__/${GITHUB_SHA}/" build/cli/config.js
- name: (BUILD) Setup Packaging Cache
uses: actions/cache@v3
with:
path: ~/.pkg-cache
key: pkg
- name: (BUILD) Package Binaries
run: yarn package
###################################################
#
# Docs
#
###################################################
- name: (DOCS) Install Dependencies
run: yarn docs:install
- name: (DOCS) Build Documentation Commands
run: yarn docs:build:commands
- name: (DOCS) Generate Licenses Page
run: yarn docs:generate:licenses
- name: (DOCS) Generate Interface Page
run: yarn docs:generate:interface
- name: (DOCS) Generate Variability4TOSCA Conformance Test Pages
run: yarn docs:generate:tests:variability
- name: (DOCS) Generate Queries4TOSCA Conformance Test Pages
run: yarn docs:generate:tests:query
- name: (DOCS) Generate TOSCA SofDCar Profile Page
run: yarn docs:generate:sofdcar
- name: (DOCS) Generate PlantUML of Service Templates
run: yarn docs:generate:puml
- name: (DOCS) Build Docs
run: yarn docs:build