Skip to content

Commit

Permalink
ci for java backend module
Browse files Browse the repository at this point in the history
  • Loading branch information
Dema-koder committed Jul 3, 2024
1 parent bfd21a5 commit a711260
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Java CI/CD with Maven

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B package --file pom.xml
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}

- name: Run tests
run: mvn test
env:
MONGO_URL: ${{ secrets.MONGO_URL }}

0 comments on commit a711260

Please sign in to comment.