Skip to content

add gitattributes

add gitattributes #4

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('**/backend/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B package --file backend/pom.xml
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
- name: Run tests
run: mvn test --file backend/pom.xml
env:
MONGO_URL: ${{ secrets.MONGO_URL }}