-
Notifications
You must be signed in to change notification settings - Fork 941
104 lines (92 loc) · 2.51 KB
/
ci-test.yml
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
name: "CI Test"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
paths-ignore:
- '**/*.md'
- '**/*.txt'
schedule:
- cron: "21 11 * * 0"
jobs:
frontend:
name: Frontend CI
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./opencti-platform/opencti-front
shell: alpine.sh --root {0}
steps:
- uses: actions/checkout@v4
- name: Setup Alpine
uses: jirutka/setup-alpine@v1
with:
branch: v3.18
packages: >
git tini gcc g++ make musl-dev cargo python3 py3-pip python3-dev postfix postfix-pcre
- name: Setup NodeJS and cache dependencies
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'
- name: Setup Python
# This is the version of the action for setting up Python, not the Python version.
uses: actions/setup-python@v4
with:
# Semantic version range syntax
python-version: '3.x'
cache: 'pip'
- name: Install NodeJS
run: npm install -g node-gyp yarn
- name: Check Python version
run: python -V
- name: Install and build frontend dependencies into Alpine
run: |
yarn install
yarn build
- name: Run linter and check TS
run: |
yarn lint
yarn check-ts
- name: Run unit and integration tests
run: |
yarn test
- name: Run test e2e
run: |
yarn playwright install --with-deps
yarn test:e2e
# backend:
# name: Backend CI
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./opencti-platform/opencti-graphql
# shell: alpine.sh --root {0}
# steps:
# - uses: actions/checkout@v4
# - uses: jirutka/setup-alpine@v1
# with:
# branch: v3.18
# packages: >
# nodejs npm git tini gcc g++ make musl-dev cargo python3 py3-pip python3-dev postfix postfix-pcre
#
# - name: Setup Node.js & python
# run: |
# npm install -g node-gyp yarn
# python -V
#
# - name: Install and build backend dependencies into Alpine
# run: |
# yarn install
# yarn build
#
# - name: Run linter and check TS
# run: |
# yarn lint
# yarn check-ts
#
# - name: Run unit and integration tests
# run: |
# yarn test:dev