-
Notifications
You must be signed in to change notification settings - Fork 28
54 lines (45 loc) · 1.47 KB
/
build-lint-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
name: 📦 Build npm Package
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
scope: '@kaoto'
cache: 'yarn'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
# Install dependencies
- run: yarn
# Lint files
- name: 💅 Run eslint
run: yarn workspaces foreach --verbose --all --topological-dev run lint
# Lint style files
- name: 💅 Run stylelint
run: yarn workspace @kaoto/kaoto run lint:style
# Run tests
- name: 🧪 Run tests
run: yarn workspaces foreach --verbose --all --topological-dev run test
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# Build packages excluding @kaoto/camel-catalog since it was build during installing dependencies
- name: Build packages
run: yarn workspaces foreach --verbose --all --topological-dev --exclude @kaoto/camel-catalog run build
# Build lib
- name: Build @kaoto/kaoto package in lib mode
run: yarn workspace @kaoto/kaoto run build:lib