-
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.
* add workflow maven file * edit workflow file * fix workflow * fix worflow * test pipeline * add maven surefire plugin to pom.xml * add maven surefire plugin to pom.xml * fix maven.yml * fix maven.yml * fix maven.yml * fix maven.yml * fix maven.yml * add caching * add caching * run tests * add pg service to github actions runner * modify actions * modify actions
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
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,42 @@ | ||
name: Java CI with Maven | ||
|
||
on: | ||
push: | ||
branches: [ "main", "feature/pipeline" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
java-tests: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:latest | ||
env: | ||
POSTGRES_DB: ms-bot | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: admin | ||
ports: | ||
- 5432:5432 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
architecture: x64 | ||
cache: maven | ||
|
||
- name: Cache the Maven packages to speed up build | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Run the Maven test | ||
run: mvn test | ||
|
||
- name: Update dependency graph | ||
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 |
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
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