forked from eclipse-che/che-theia
-
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (74 loc) · 2.21 KB
/
pr-build.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
#
# Copyright (c) 2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Che-Theia workflow
# matrix jobs with alpine and ubi8
name: CI
# Trigger the workflow on pull request
on: [pull_request]
jobs:
node-build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
name: Checkout che-theia source code
with:
fetch-depth: "0"
- uses: actions/setup-node@v1
name: Configuring nodejs 10.x version
with:
node-version: '14.x'
- name: build
run: yarn
- name: Test Coverage
uses: codecov/codecov-action@v1
docker-build:
strategy:
matrix:
dist: [ 'alpine', 'ubi8' ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
name: Checkout che-theia source code
- uses: actions/setup-node@v1
name: Configuring nodejs 10.x version
with:
node-version: '14.x'
- name: build
run: |
docker image prune -a -f
docker pull quay.io/eclipse/che-theia-dev:next
docker tag quay.io/eclipse/che-theia-dev:next eclipse/che-theia-dev:next
./build.sh --root-yarn-opts:--ignore-scripts --dockerfile:Dockerfile.${{matrix.dist}}
# use CDN to make sure we're testing our webpack customizer properly
env:
CDN_PREFIX: https://static.developers.redhat.com/che/theia_artifacts/
MONACO_CDN_PREFIX: https://cdn.jsdelivr.net/npm/
travis-build:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Trigger build on Travis CI
run: |
body="{
\"request\":{
\"config\": {
\"env\": {
\"global\": [
\"PR_NUMBER=${{ github.event.pull_request.number }}\"
]
}
}
}}"
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${{ secrets.TRAVIS_TOKEN }}" \
-d "$body" \
https://api.travis-ci.com/repo/eclipse-che%2Fche-theia/requests