forked from shardus/lib-types
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.8 KB
/
ci.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
name: Typescript CI Workflow
on:
push:
branches:
- dev
pull_request:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: |
echo "Installing dependencies..."
npm ci
echo "Dependency installation complete."
- name: Build
run: |
echo "Compiling the code..."
npm run compile
echo "Compile complete."
- name: Lint
run: |
echo "Running Linter..."
npm run lint
echo "Running Linter complete."
- name: Format check
run: |
echo "Running format check..."
npm run format-check
echo "Format check complete."
- name: Test apply patches
run: |
set -e
for patch in *.patch; do
if [ -f "$patch" ]; then
echo "Testing $patch"
git apply --check -v "$patch" || (echo "Failed to apply patch: $patch" && exit 1)
fi
done
echo "No patches to test or all patches applied successfully."
trigger-jenkins:
needs: build
runs-on: ubuntu-latest
steps:
- name: Trigger Jenkins Job
env:
BRANCH_NAME: ${{ github.ref_name }}
run: |
curl -f -X POST "${{ secrets.JENKINS_URL }}/job/${{ secrets.JENKINS_JOB_NAME_SMOKE_10_X_10 }}/buildWithParameters" \
--user "${{ secrets.JENKINS_API_CREDS }}" \
--data-urlencode json='{"parameter": [{"name":"SPECIFY_SHARDUS_TYPES_BRANCH", "value":"true"}, {"name":"SHARDUS_TYPES_BRANCH", "value":"'"${BRANCH_NAME}"'"}]}'