Skip to content

Commit

Permalink
SYS-164 added workflow to run linter and trigger smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TieDyedSheep committed May 15, 2024
1 parent f278584 commit ade1042
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
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 }}"

0 comments on commit ade1042

Please sign in to comment.