Skip to content

Commit

Permalink
feat: add github action config files
Browse files Browse the repository at this point in the history
  • Loading branch information
BulatRuslanovich committed Oct 13, 2024
1 parent 0bb332f commit fdf46f3
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/dispatcher.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build dispatcher module

on:
workflow_dispatch:
push:
branches: [ master ]
paths: [ .github/workflows/dispatcher.yml, dispatcher/** ]
pull_request:
branches: [ master ]
paths: [ .github/workflows/dispatcher.yml, dispatcher/** ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven
- name: Run compile
run: mvn -f dispatcher/pom.xml clean compile --no-transfer-progress

- name: Run tests
run: mvn -f dispatcher/pom.xml clean test

- name: Run Checkstyle
run: mvn -f dispatcher/pom.xml checkstyle:check

- name: Package the application
run: mvn -f dispatcher/pom.xml package

# deploy:
# runs-on: ubuntu-latest
# needs: build
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
#
# - name: Set up SSH agent
# uses: webfactory/ssh-agent@v0.8.1
# with:
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
#
# - name: Deploy and Run Docker Compose
# run: |
# ssh ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} << 'EOF'
# cd /path/to/your/docker-compose/directory
# docker-compose pull
# docker-compose down
# docker-compose up -d --build
# EOF
44 changes: 44 additions & 0 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build node module

on:
workflow_dispatch:
push:
branches: [ master ]
paths: [ .github/workflows/node.yml, node/** ]
pull_request:
branches: [ master ]
paths: [ .github/workflows/node.yml, node/** ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven
- name: Run compile
run: mvn -f node/pom.xml clean compile --no-transfer-progress

- name: Run tests
run: mvn -f node/pom.xml clean test

- name: Run Checkstyle
run: mvn -f node/pom.xml clean checkstyle:check

- name: Package the application
run: mvn -f node/pom.xml package

0 comments on commit fdf46f3

Please sign in to comment.