forked from shardus/lib-types
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SYS-164 added workflow to run linter and trigger smoke tests
- Loading branch information
1 parent
f278584
commit ade1042
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
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@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- 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?SPECIFY_SHARDUS_TYPES_BRANCH=true&SHARDUS_TYPES_BRANCH=${{ github.ref_name }}" \ | ||
--user "${{ secrets.JENKINS_API_CREDS }}" |